- I add an endlessly repeating animation to view_A.
- The animation starts.
- I swap view_A out of its superview for view_B.
- The animation on view_A stops — I can tell that in my
animationDidStop:finished:
delegate method — and I can see[view_A.layer animationForKey:theAnimationKey]
isnil
,view_A.layer.animationKeys
isnil
andview_A.layer.animations
(print view_A.layer in GDB can reveal that) is empty. (Question 1: Are all animations removed automatically when view is removed from its superview?) - I swap view_A back. Here comes the odd thing: I see the animation is still going. (Question 2: how could the animation keep going after it is stopped and removed from its view?)
- The even more bizarre thing is that I can stop the animation after step 5 by calling
[view_A.layer removeAnimationForKey:theAnimationKey]
!
質問する
457 次
1 に答える
1
I believe it is a bug of Core Animation. Here is my radar: http://openradar.appspot.com/radar?id=6165852231565312.
于 2014-08-25T23:24:16.483 に答える