I do not know why the error "Extra argument" usingSpringWithDamping "in the call" unexpectedly appears for the following.
I am just starting, 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
)
source
share