Skip to content

Instantly share code, notes, and snippets.

@jerryhjones
Created January 15, 2014 18:49
Show Gist options
  • Save jerryhjones/8441953 to your computer and use it in GitHub Desktop.
Save jerryhjones/8441953 to your computer and use it in GitHub Desktop.
Alloc UIView
UIView Alloc's Dynamic Animator
- Alloc's Gravity Behavior
- Assigns gravity to animator
- Calls CMMotionManager startDeviceMotionUpdatesToQueue
-- Block captures gravity object
UIView deallocates
Dynamic Animator Deallocates
startDeviceMotionUpdatesToQueue callback is called
captured gravity property is changed
UIGravityBehavior calls [UIDynamicAnimator _world] on a deallocated instance (the previously deallocated instance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment