UIKit Dynamics is an animation framework in iOS that uses physics-based behaviors like gravity, collisions, attachments and forces to simulate real-world interactions. It includes behaviors for gravity, collisions, attachments, snapping and pushing. While not fully accurate physics, it allows composable animations through combining multiple behaviors. The document provides examples of behaviors and how to compose them, as well as limitations and resources for learning more.
2. What is UIKit Dynamics?
A composable, reusable, declarative, real-world
inspired animation and interaction system.
3. What is UIKit Dynamics?
Based on real-world interactions
Gravity
Collisions
Attachments
Snap
Forces
Weight
4. Limitations
It is possible to create behaviors that cant be satis鍖ed
Not completely accurate physics
Does not replace Core Animation, UIView animations,
or motion effects
Only supports 2D transforms
6. UICollisionBehavior
Views can collide with boundaries and other views
Views can collide conditionally with other views
Callbacks for when collisions begin and end
(UICollisionBehaviorDelegate)
Collisions have a CPU cost
7. UIAttachmentBehavior
Acts like a rope, string, or spring
Damping is customizable
Has a length and two anchor points
Attachments are invisible