JJAnimationSettings

@objc
public class JJAnimationSettings : NSObject

General animation configuration settings

  • Duration of the animation. Default is 0.3

    Declaration

    Swift

    @objc
    public var duration: TimeInterval
  • Damping ratio of the animation. Default is 0.55

    Remark

    Not used for transitions.

    Declaration

    Swift

    @objc
    public var dampingRatio: CGFloat
  • Initial velocity of the animation. Default is 0.3

    Remark

    Not used for transitions.

    Declaration

    Swift

    @objc
    public var initialVelocity: CGFloat
  • Delay in between two item animations. Default is 0.1

    Remark

    Only used for item animations.

    Declaration

    Swift

    @objc
    public var interItemDelay: TimeInterval
  • Initializes and returns a newly allocated animation settings object with specified parameters.

    Declaration

    Swift

    @objc
    public convenience init(duration: TimeInterval = 0.3,
                            dampingRatio: CGFloat = 0.55,
                            initialVelocity: CGFloat = 0.3,
                            interItemDelay: TimeInterval = 0.1)

    Parameters

    duration

    Duration of the animation. Default is 0.3.

    dampingRatio

    Damping ratio of the animation. Default is 0.55

    initialVelocity

    Initial velocity of the animation. Default is 0.3

    interItemDelay

    Delay in between two item animations. Default is 0.1

    Return Value

    An initialized animation settings object.