BoundsPreferenceKey

@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public struct BoundsPreferenceKey : PreferenceKey

Collects bound, center coordinates and pass layout data to it’s parent View

  • Declaration

    Swift

    public typealias Value = Anchor<CGRect>?
  • provide a default value for custom dependency

    Declaration

    Swift

    public static var defaultValue: Value
  • Declaration

    Swift

    public static func reduce(value: inout Value, nextValue: () -> Value)