Inspecting View Layout
Determine the position and extent of a view using Xcode previews or by adding temporary borders.
Technology
Use layout modifiers to fine tune the placement of views in a view hierarchy. You can adjust or constrain the size, position, and alignment of a view. You can also add padding around a view, and indicate how the view interacts with system-defined safe areas.
Before using these modifiers, be sure establish the basic arrangement of views using layout containers, like stacks and grids, described in Layout Containers.
func frame(width: CGFloat?, height: CGFloat?, alignment: Alignment) -> some View
func frame(minWidth : CGFloat?, idealWidth : CGFloat?, maxWidth : CGFloat?, minHeight : CGFloat?, idealHeight : CGFloat?, maxHeight : CGFloat?, alignment: Alignment) -> some View
func fixedSize () -> some View
func fixedSize (horizontal: Bool, vertical: Bool) -> some View
func layoutPriority (Double) -> some View
func position(CGPoint) -> some View
func position(x: CGFloat, y: CGFloat) -> some View
func offset(CGSize) -> some View
func offset(x: CGFloat, y: CGFloat) -> some View
func coordinateSpace <T>(name: T) -> some View
func alignmentGuide (HorizontalAlignment , computeValue : (ViewDimensions ) -> CGFloat) -> some View
func alignmentGuide (VerticalAlignment , computeValue : (ViewDimensions ) -> CGFloat) -> some View
func padding(CGFloat) -> some View
func padding(Edge.Set, CGFloat?) -> some View
func padding(EdgeInsets ) -> some View
func listRowInsets (EdgeInsets ?) -> some View
func scenePadding (Edge.Set) -> some View
func ignoresSafeArea (SafeAreaRegions , edges: Edge.Set) -> some View
func safeAreaInset <V>(edge: VerticalEdge , alignment: HorizontalAlignment , spacing: CGFloat?, content: () -> V) -> some View
func safeAreaInset <V>(edge: HorizontalEdge , alignment: VerticalAlignment , spacing: CGFloat?, content: () -> V) -> some View
func zIndex (Double) -> some View