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.
How to know when the pushed view stopped moving. UIKit Dynamics
-
12-10-2022 - |
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?
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow