質問編集履歴
1
コードを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -42,4 +42,17 @@
|
|
42
42
|
|
43
43
|
上記のコードで実行すると1つ目のレイヤーで定義しているアニメーションはうまくいくのですが、2つ目のレイヤーのアニメーションが1つ目のアニメーションが終わったタイミングで終わってしまいます。
|
44
44
|
|
45
|
-
原因が全くわからず困っています、2つのレイヤーでアニメーションをさせる際に何か処理が必要なのでしょうか?
|
45
|
+
原因が全くわからず困っています、2つのレイヤーでアニメーションをさせる際に何か処理が必要なのでしょうか?
|
46
|
+
|
47
|
+
|
48
|
+
## ※追記
|
49
|
+
expandAnimateメソッドの中身はこんな感じです
|
50
|
+
```
|
51
|
+
private func expandAnimate(end: CGPath?, duration: Double,biginTime: Double) -> CABasicAnimation {
|
52
|
+
let basicAnimation = CABasicAnimation(keyPath: "path")
|
53
|
+
basicAnimation.toValue = end
|
54
|
+
basicAnimation.duration = duration
|
55
|
+
basicAnimation.beginTime = biginTime
|
56
|
+
return basicAnimation
|
57
|
+
}
|
58
|
+
```
|