uidynamicbehavior

Strange SpriteKit + UIDynamics Bug

我与影子孤独终老i 提交于 2019-11-28 05:21:27
问题 So I'm developing a game using SpriteKit. And to make the game more interesting I decided to use UIDynamicAnimator to add some physics to the UIKit elements within my game. Everything works great except there is one major problem. The moment I alloc/init a UIDynamicAnimator like so: animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; The physics bodies in my game get completely offset. Even if I don't specify a reference view the physics still get offset. What's strange is