FollowPuckViewportStateOptions

@_spi(Experimental)
public struct FollowPuckViewportStateOptions : Hashable

Configuration options for FollowPuckViewportState.

Each of the CameraOptions-related properties is optional, so that the state can be configured to only modify certain aspects of the camera if desired. This can be used, to achieve effects like allowing zoom gestures to work simultaneously with FollowPuckViewportState.

  • The value to use for padding when setting the camera. If nil, padding will not be modified.

    Declaration

    Swift

    public var padding: UIEdgeInsets?
  • The value to use for zoom when setting the camera. If nil, zoom will not be modified.

    Declaration

    Swift

    public var zoom: CGFloat?
  • Indicates how to obtain the value to use for bearing when setting the camera. If nil, bearing will not be modified.

    Declaration

    Swift

    public var bearing: FollowPuckViewportStateBearing?
  • The value to use for pitch when setting the camera. If nil, pitch will not be modified.

    Declaration

    Swift

    public var pitch: CGFloat?
  • Memberwise initializer for FollowPuckViewportStateOptions.

    All parameters have default values.

    Declaration

    Swift

    public init(padding: UIEdgeInsets? = .zero,
                zoom: CGFloat? = 16.35,
                bearing: FollowPuckViewportStateBearing? = .heading,
                pitch: CGFloat? = 45)

    Parameters

    padding

    Defaults to UIEdgeInsets.zero.

    zoom

    Defaults to 16.35.

    bearing

    Defaults to heading.

    pitch

    Defaults to 45.

  • Combines all fields into hasher

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)