以下のコードに、UIViewAnimationCurveの設定をしたいのですが、
UIViewAnimationCurveEaseInOut、UIViewAnimationCurveLinearを
shop1,shop2それぞれに設定するには、どのように書けば動くようになるでしょうか。
swift3
1 override func viewWillAppear(_ animated: Bool) { 2 super.viewWillAppear(animated) 3 4 shop1.center.x += view.bounds.height 5 shop2.center.x += view.bounds.height 6 7 8 } 9 10 override func viewDidAppear(_ animated: Bool) { 11 super.viewDidAppear(animated) 12 13 UIView.animate(withDuration: 1.5, animations: { 14 15 self.shop1.center.x -= self.view.bounds.height 16 self.shop2.center.x -= self.view.bounds.height 17 18 }, completion: nil) 19 20 21 } 22
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/08 01:33
2017/01/08 01:55
2017/01/08 02:37