나의 플랫폼/iOS

[iOS][Animation] 혹시 CAKeyframeAnimation이 동작하지 않을때

GsBOB 2017. 5. 29. 12:13

CAKeyframeAnimation을 사용하여 잘 동작을 하다가,

백그라운드에서 포그라운드로 이동할 경우

Animation이 멈춰버리는 현상이 발생


animation.isRemovedOnCompletion = false 


위와 같이 Animation에 isRemovedOnCompletions에 false를 줘보세요~


Discussion

When true, the animation is removed from the target layer’s animations once its active duration has passed. Defaults to true.

https://developer.apple.com/reference/quartzcore/caanimation/1412458-isremovedoncompletion

참고하세요.