我对arraySwift 2 中的动画选项有一些问题。我可以array像这样添加多个选项:[.Repeat, UIViewAnimationOptions.Autoreverse]这是如果我添加动画功能(第一个示例):
UIView.animateWithDuration(1, delay: 0, options: [.Repeat, UIViewAnimationOptions.Autoreverse], animations: {
}) { (true) in
}
Run Code Online (Sandbox Code Playgroud)
但我不能array像这样添加动画选项(第二个例子):
var animationOptions = [UIViewAnimationOptions]()
animationOptions.append(UIViewAnimationOptions.Repeat)
animationOptions.append(UIViewAnimationOptions.Autoreverse)
UIView.animateWithDuration(1, delay: 0, options: animationOptions, animations: {
}) { (true) in
}
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我像第二个例子那样在数组中制作动画选项吗?