Bronze Challenge: Spring Animations

iOS has a powerful physics engine built in. An easy way to harness this power is by using a spring animation.

// UIView

class func animate(withDuration duration: TimeInterval,
    delay: TimeInterval,
    usingSpringWithDamping dampingRatio: CGFloat,
    initialSpringVelocity velocity: CGFloat,
    options: UIViewAnimationOptions,
    animations: () -> Void,
    completion: ((Bool) -> Void)?)

Use this method to have the two labels animate on and off the screen in a spring-like fashion. Refer to the UIView documentation to understand each of the arguments.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset