Declaration
compose().listSectionMargins(
edges: SwiftUI.EdgeSet | undefined,
length: number | null
)nonisolated func listSectionMargins(
_ edges: Edge.Set = .all,
_ length: CGFloat?
) -> some ViewParameters
edges*SwiftUI.EdgeSet | undefinedThe set of edges to pad for sections in this view. The default is
Edge.Set.all.length*number | nullAn amount, given in points, to pad section on the specified edges.
Return value
A view in which the margins of list sections are set to the specified amount on the specified edges.
Discussion
Use this modifier on a list section to set customize its margins.
Indicate the edges to set the margin of by naming either a single value
from Edge.Set, or by specifying an
doc://com.apple.documentation/documentation/Swift/OptionSet that
contains edge values. Margins for the other edges remain unchanged.
The default section margins are based on the list style, list section spacing and content margins of the list. Using this modifier overrides these default values completely.
For sections that have headers or footers, the section margins are applied around these.
See also
More in Lists and tables.
- deleteDisabledAdds a condition for whether the view's view hierarchy is deletable.
- listItemTintSets the tint effect for content in a list.
- listRowBackgroundPlaces a custom background view behind a list row item.
- listRowInsetsSets the insets of rows in a list on the specified edges.
- listRowSeparatorSets the display mode for the separator associated with this specific row.
- listRowSeparatorTintSets the tint color associated with a row.
- listRowSpacingSets the vertical spacing between two adjacent rows in a List.
- listSectionIndexVisibilityChanges the visibility of the list section index.
- listSectionSeparatorSets whether to hide the separator associated with a list section.
- listSectionSeparatorTintSets the tint color associated with a section.
- listSectionSpacingSets the spacing between adjacent sections in a List to a custom value.
- moveDisabledAdds a condition for whether the view's view hierarchy is movable.