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
}
誰かが私にはseconのような配列でアニメーションオプションを作るのを助けることができますdの例?あなたはは、optionが準拠SetAlgebra議定書からのインサートを使用する必要が
UIView.animateWithDuration(0.2, delay: 0.0, options: [.Repeat,
.Autoreverse, .CurveLinear, .CurveEaseOut, .CurveEaseInOut,
.TransitionCurlUp, .TransitionCurlDown,
.TransitionFlipFromBottom,.TransitionFlipFromLeft,.TransitionFlipFromRight,
.BeginFromCurrentState, .CurveEaseIn], animations: {}, completion: nil)
Waooow、Thanks a lot @ New16。これは私の質問に答える! – icaksama