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 that i'm creating the UIDynamicAnimator in a completely separate ViewController so it's not like it's sharing the same reference view or something like that.
Update: Even the act of simply creating a UIDynamicItemBehavior like so:
UIDynamicBehavior* a = [[UIDynamicBehavior alloc] init];
messes up my scene's physics.
I'm assuming this is an internal bug with the physics engine that SpriteKit and UIDynamics share.
Anyone have any suggestions?