我有一些问题关于动画选项array
在Swift 2中。我可以添加多个选项array
这样:[.Repeat, UIViewAnimationOptions.Autoreverse]
这是如果我添加动画功能(第一例如):iOS Swift - 无法更改动画选项与阵列[UIViewAnimationOptions]
UIView.animateWithDuration(1, delay: 0, options: [.Repeat, UIViewAnimationOptions.Autoreverse], animations: {
}) { (true) in
}
但我不能在array
这样的动画添加选项(第二个例子):
var animationOptions = [UIViewAnimationOptions]()
animationOptions.append(UIViewAnimationOptions.Repeat)
animationOptions.append(UIViewAnimationOptions.Autoreverse)
UIView.animateWithDuration(1, delay: 0, options: animationOptions, animations: {
}) { (true) in
}
有人可以帮我做动画选项数组一样塞康d例子?
Waooow,非常感谢@ New16。这回答我的问题! – icaksama