我刚刚开始编程并按照在线教程进行操作,但无法创建此动画。谁能告诉我为什么它说:
Nil 与预期参数类型 UIViewAnimationOptions 不兼容
以及如何解决它?
view.addSubview(myFirstLabel)
UIView.animateWithDuration(0.5, delay: 0.0, usingSpringWithDamping: 0.0, initialSpringVelocity: 0.0, options: nil, animations: {
self.myFirstLabel.center = CGPoint(x: 100, y:40 + 200)
}, completion: nil)
您可以更换options: nil
with options: []
应该使错误消失。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)