Your UIDynamicAnimator
freed when returning viewDidLoad
. He cannot revive anything if he is free. Make a property:
@property (nonatomic) UIDynamicAnimator *animator;
And install it:
self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
source share