Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个UIView我应用UIPushBehavior的模式UIPushBehaviorModeInstantaneous。知道被推UIView停止移动的最简单方法是什么?
UIView
UIPushBehavior
UIPushBehaviorModeInstantaneous
在您的视图控制器中,将您的 UIDynamicAnimator 的委托属性设置为 self。然后你会在动画停止时收到 dynamicAnimatorDidPause 通知。定义一个 dynamicAnimatorDidPause 函数来处理事件。请参阅 UIDynamicAnimator 上的 Xcode 文档。