Skip to content

Commit

Permalink
Merge pull request airbnb#1061 from thephamiliar/jp--animation-speed-…
Browse files Browse the repository at this point in the history
…animated-control

Expose animation speed for animated control
  • Loading branch information
thedrick committed Oct 25, 2019
2 parents 41ddfb8 + 88a9d43 commit 76880a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lottie-swift/src/Public/iOS/AnimatedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ open class AnimatedControl: UIControl {
animationDidSet()
}
}

/// The speed of the animation playback. Defaults to 1
public var animationSpeed: CGFloat {
set { animationView.animationSpeed = newValue }
get { return animationView.animationSpeed }
}

/// Sets which Animation Layer should be visible for the given state.
public func setLayer(named: String, forState: UIControl.State) {
Expand Down

0 comments on commit 76880a0

Please sign in to comment.