GeometryProxy

A proxy for access to the size and coordinate space (for anchor resolution) of the container view.

StructureiOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+GeometryProxy in SwiftUI

Declaration

React
type GeometryProxy =
  | { readonly containerCornerInsets: RectangleCornerInsets; readonly safeAreaInsets: EdgeInsets; readonly size: CGSize; bounds(options: { of: NamedCoordinateSpace; }): Promise<CGRect
  | null>; concentricCornerRadii(options: { in: CGRect; }): Promise<RectangleCornerRadii
  | null>; contentMargins(options: { for: ContentMarginGuide; edges?: EdgeSet; }): Promise<EdgeInsets>; frame(options: { in: CoordinateSpaceProtocol; }): Promise<CGRect>; reservedRegions(options: { kind: ReservedRegionKind; options?: ReservedRegionQueryOptions; layoutDirectionBehavior?: LayoutDirectionBehavior; }): Promise<ReservedRegion[]>; };
Swift
struct GeometryProxy

Properties

  • containerCornerInsets*RectangleCornerInsets

    Returns the corner insets of the container view. Use this value to adjust the geometry of a view based on the overlapping corner insets of the container view. Corner insets may include pieces of system UI as well as the corner radii for windows and presentations.

  • safeAreaInsets*EdgeInsets

    The safe area inset of the container view.

  • size*CGSize

    The size of the container view.

Used by

See also

More in Layout.