我不知道为什么错误,"额外的参数'在调用中使用SpringWithDamping'突然出现在下面.
我刚刚开始,所以任何帮助将不胜感激!
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
)
Run Code Online (Sandbox Code Playgroud)
试试这个:
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)
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2775 次 |
| 最近记录: |