Overloads
2 ways to call compose().safeAreaBar(). Each is one SwiftUI overload, picked by the arguments you pass.
compose().safeAreaBar({
edge: SwiftUI.VerticalEdge,
alignment?: SwiftUI.HorizontalAlignment,
spacing?: number | null,
content: ReactNode,
})nonisolated func safeAreaBar(
edge: VerticalEdge,
alignment: HorizontalAlignment = .center,
spacing: CGFloat? = nil,
@ContentBuilder content: () -> some View
) -> some ViewParameters
options.edge*SwiftUI.VerticalEdgeThe vertical edge of the view on which
contentis placed.options.alignmentSwiftUI.HorizontalAlignmentThe alignment guide used to position
contenthorizontally.options.spacingnumber | nullExtra distance placed between the two views, or nil to use the default amount of spacing.
options.content*ReactNodeA content builder function providing the view to display as a custom bar.
Return value
A new view that displays content above or below the modified view, making space for the content view by vertically insetting the modified view, adjusting the safe area and scroll edge effects to match.
Discussion
Similar to the View.safeAreaInset(edge:alignment:spacing:content:)-4s51l
modifier, the content view is anchored to the specified vertical
edge of the parent view and its height insets the safe area.
Additionally, it extends the edge effect of any scroll views affected by the inset safe area.
See also
More in Layout.
- alignmentGuideSets the view's vertical alignment.
- aspectRatioConstrains this view's dimensions to the specified aspect ratio.
- containerCornerOffsetAdjusts the view's layout to avoid the container view's corner insets for the specified edges.
- containerRelativeFramePositions this view within an invisible frame with a size relative to the nearest container.
- controlSizeSets the size for controls within this view.
- defaultScrollAnchorAssociates an anchor to control which part of the scroll view's content should be rendered by default.
- dynamicTypeSizeSets the Dynamic Type size within the view to the given value.
- fixedSizeFixes this view at its ideal size.
- flipsForRightToLeftLayoutDirectionSets whether this view mirrors its contents horizontally when the layout direction is right-to-left.
- framePositions this view within an invisible frame.
- geometryGroupIsolates the geometry (e.g. position and size) of the view from its parent view.
- gridCellAnchorSpecifies a custom alignment anchor for a view that acts as a grid cell.