I have two UIViews. I use UIDynamicAnimatior. I add gravity and collision to these UIviews. When the app starts, I want to pause the animation when I tap the screen or switch the app to the background. When I tap the screen again, the app will resume.
Asked
Active
Viewed 67 times
0
-
A similar question has been asked in the past but there were no answers. The question mentions removing all the behaviours (easy using `removeAllBehaviours`) to pause the animation and then re-adding them all to re-start the animation. It might be possible to save the `behaviours` array property before removing the behaviours. See here: http://stackoverflow.com/q/21452151/558933 – Robotic Cat Dec 14 '14 at 17:41
-
I tried to remove all behaviors. But the uivew are still moving with inertial. How can I freeze the uiview. When I want to resume, it will move as usual. – poirot Dec 15 '14 at 05:36