HorizontalRevealAnimationConfig

@objcMembers
@objc(GSHorizontalRevealAnimationConfig)
public class HorizontalRevealAnimationConfig : NSObject, AnimationConfig

Horizontal reveal animation configuration class.

Allows to configure the following parameters for this animation:

  • speed: animation execution speed, in meters per second. If with(speed:) is not customized, then the drone will apply its own default value for this parameter.
  • distance: distance the drone will fly forward, in meters. If with(distance:) 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 speed, in meters per second. Value is nil if with(speed:) has never been called.

    Declaration

    Swift

    public private(set) var speed: Double? { get }
  • Custom distance, in meters. Value is nil if with(distance:) has never been called.

    Declaration

    Swift

    public private(set) var distance: Double? { 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 speed.

    Declaration

    Swift

    @discardableResult
    public func with(speed: Double) -> HorizontalRevealAnimationConfig

    Parameters

    speed

    custom animation speed, in meters per second

    Return Value

    self, to allow call chaining

  • Configures a custom animation vertical distance.

    Declaration

    Swift

    @discardableResult
    public func with(distance: Double) -> HorizontalRevealAnimationConfig

    Parameters

    distance

    custom vertical distance, in meters

    Return Value

    self, to allow call chaining

  • Configures a custom animation execution mode.

    Declaration

    Swift

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

    Parameters

    mode

    custom execution mode

    Return Value

    self, to allow call chaining

  • 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 }