I don't know why the error, "Extra argument 'usingSpringWithDamping' in call" is suddenly appearing for the following.
I'm just starting out, so any help would be appreciated!
UIView.animateWithDuration(1.0,
delay: 0,
usingSpringWithDamping: 1.5,
initialSpringVelocity: 5.0,
options: UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.AllowUserInteraction,
animations: {
self.view.backgroundColor = newColor
self.funFactLabel.transform = CGAffineTransformMakeScale(1.25, 1.25)
}, completion: { finished in
UIView.animateWithDuration(2.0,
delay: 0,
usingSpringWithDamping: 0.5,
initialSpringVelocity: 5.0,
options: nil,
animations: {
self.funFactLabel.transform = CGAffineTransformMakeScale(1.0, 1.0)
}
)}, completion: nil
)
Try this:
UIView.animateWithDuration(1.0,
delay: 0,
usingSpringWithDamping: 1.5,
initialSpringVelocity: 5.0,
options: UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.AllowUserInteraction,
animations: {
self.view.backgroundColor = newColor
self.funFactLabel.transform = CGAffineTransformMakeScale(1.25, 1.25)
}, completion: { finished in
UIView.animateWithDuration(2.0,
delay: 0,
usingSpringWithDamping: 0.5,
initialSpringVelocity: 5.0,
options: nil,
animations: {
self.funFactLabel.transform = CGAffineTransformMakeScale(1.0, 1.0)
} , completion: nil)
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With