Question

I have a UIView on which I apply a UIPushBehavior of mode UIPushBehaviorModeInstantaneous. What is the easiest way to know when the pushed UIView stops moving?

Était-ce utile?

La solution

In your view controller, set the delegate property of your UIDynamicAnimator to be self. Then you will receive dynamicAnimatorDidPause notifications when the animation stops. Define a dynamicAnimatorDidPause function to handle the event. See the Xcode documentation on UIDynamicAnimator.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top