VertigoAnimationConfig

@objcMembers
@objc(GSVertigoAnimationConfig)
public class VertigoAnimationConfig : NSObject, AnimationConfig

Vertigo animation configuration class.

Allows to configure the following parameters for this animation:

  • duration: animation execution duration, in second. If with(duration:) is not customized, then the drone will apply its own default value for this parameter.
  • maxZoomLevel: maximal zoom level. If with(maxZoomLevel:) is not customized, then the drone will apply its own default value for this parameter.
  • finishAction: animation finish action. If with(finishAction:) is not customized, then the drone will apply its own default value for this parameter.
  • mode: animation execution mode. If with(mode:) is not customized, then the drone will apply its own default value for this parameter: .once.
  • Declaration

    Swift

    public let type: AnimationType
  • Custom duration, in seconds. Value is nil if with(duration:) has never been called.

    Declaration

    Swift

    public private(set) var duration: Double? { get }
  • Custom max zoom level. Value is nil if with(maxZoomLevel:) has never been called.

    Declaration

    Swift

    public private(set) var maxZoomLevel: Double? { get }
  • Custom finish action. Value is nil if with(finishAction:) has never been called.

    Declaration

    Swift

    public private(set) var finishAction: VertigoAnimationFinishAction? { get }
  • Custom execution mode. Value is nil if with(mode:) has never been called.

    Declaration

    Swift

    public private(set) var mode: AnimationMode? { get }
  • Configures a custom animation duration.

    Declaration

    Swift

    @discardableResult
    public func with(duration: Double) -> VertigoAnimationConfig

    Parameters

    duration

    custom animation duration, in seconds

    Return Value

    self, to allow call chaining

  • Configures a custom animation max zoom level.

    Declaration

    Swift

    @discardableResult
    public func with(maxZoomLevel: Double) -> VertigoAnimationConfig

    Parameters

    maxZoomLevel

    max zoom level

    Return Value

    self, to allow call chaining

  • Configures a custom animation finish action.

    Declaration

    Swift

    @discardableResult
    public func with(finishAction: VertigoAnimationFinishAction) -> VertigoAnimationConfig

    Parameters

    finishAction

    custom finish action

    Return Value

    self, to allow call chaining

  • Configures a custom animation execution mode.

    Declaration

    Swift

    @discardableResult
    public func with(mode: AnimationMode) -> VertigoAnimationConfig

    Parameters

    mode

    custom execution mode

    Return Value

    self, to allow call chaining

  • true when with(finishAction:) has been called once. ObjC-only api. In Swift, use finishAction.

    Declaration

    Swift

    public var finishActionIsCustom: Bool { get }
  • Custom finish action. Value is meaningless if finishActionIsCustom is false. ObjC-only api. In Swift, use finishAction.

    Declaration

    Swift

    public var customFinishAction: VertigoAnimationFinishAction { get }
  • true when with(mode:) has been called once. ObjC-only api. In Swift, use mode.

    Declaration

    Swift

    public var modeIsCustom: Bool { get }
  • Custom mode. Value is meaningless if modeIsCustom is false. ObjC-only api. In Swift, use mode.

    Declaration

    Swift

    public var customMode: AnimationMode { get }