Ant*_*ine 1 uiview ios swift swift2
我试图使用JSSAlertView(github.com/stakes/JSSAlertView)与Swift 2.0,但我有一个错误:
Cannot invoke animateWithDuration with an argument list of type '(Double, delay: Double, usingSpringWithDampling: Double, initialSpringVelocity: Double, options: nil, animations () -> _, completion: (Bool) -> _)'
Run Code Online (Sandbox Code Playgroud)
代码:
UIView.animateWithDuration(0.5, delay: 0.05, usingSpringWithDamping: 0.8, initialSpringVelocity: 0.5, options: nil, animations: {
self.containerView.center = self.rootViewController.view.center
}, completion: { (finished: Bool) in
})
Run Code Online (Sandbox Code Playgroud)
我看到了这两个答案: 嵌套的闭包不喜欢参数列表 UIView动画在Swift中不起作用,错误的参数错误 但它们对我没有帮助.
我仍然认为问题来自"动画"或"完成".
| 归档时间: |
|
| 查看次数: |
1618 次 |
| 最近记录: |