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.
See also
transitionsToIdleUponUserInteraction
-
The value to use for
paddingwhen setting the camera. Ifnil, padding will not be modified.Declaration
Swift
public var padding: UIEdgeInsets? -
The value to use for
zoomwhen setting the camera. Ifnil, zoom will not be modified.Declaration
Swift
public var zoom: CGFloat? -
Indicates how to obtain the value to use for
bearingwhen setting the camera. Ifnil, bearing will not be modified.Declaration
Swift
public var bearing: FollowPuckViewportStateBearing? -
The value to use for
pitchwhen setting the camera. Ifnil, pitch will not be modified.Declaration
Swift
public var pitch: CGFloat? -
The duration of an animation that happens once when
FollowPuckViewportState/startUpdatingCamera()is invoked.Note
This option and the animation that it influences may be removed in a future update after a solution to the “moving target problem” is implemented inDefaultViewportTransition. At the moment,DefaultViewportTransitioncalculates its animations based on the puck location at the beginning of the transition, so the farther the puck moves while the transition is in progress, the larger the jump when it completes and control is transferred to the target state. Tune this value for your use case to reduce the visibility of that jump.Declaration
Swift
public var animationDuration: TimeInterval -
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, animationDuration: TimeInterval = 1)Parameters
paddingDefaults to
UIEdgeInsets.zero.zoomDefaults to 16.35.
bearingDefaults to
heading.pitchDefaults to 45.
animationDurationDefaults to 1.
-
Combines all fields into
hasherDeclaration
Swift
public func hash(into hasher: inout Hasher)
FollowPuckViewportStateOptions Structure Reference