ios – Xcode 6.1:UIView.animateWithDuration额外参数’usingS
发布时间:2020-12-14 17:57:04 所属栏目:百科 来源:网络整理
导读:我不知道为什么错误,“额外的参数’在调用中使用 SpringWithDamping’突然出现在下面. 我刚刚开始,所以任何帮助将不胜感激! UIView.animateWithDuration(1.0,delay: 0,usingSpringWithDamping: 1.5,initialSpringVelocity: 5.0,options: UIViewAnimationOpt
我不知道为什么错误,“额外的参数’在调用中使用
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,usingSpringWithDamping: 0.5,options: nil,animations: { self.funFactLabel.transform = CGAffineTransformMakeScale(1.0,1.0) } )},completion: nil ) 解决方法
试试这个:
UIView.animateWithDuration(1.0,animations: { self.view.backgroundColor = newColor self.funFactLabel.transform = CGAffineTransformMakeScale(1.25,1.25) },completion: { finished in UIView.animateWithDuration(2.0,animations: { self.funFactLabel.transform = CGAffineTransformMakeScale(1.0,1.0) },completion: nil) }) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |