3. THE DYNAMIC ANIMATOR
•
Responsible for coordinating the dynamic
behaviors
•
Underlying physics engine to perform the
animation
•
Represented by an instance of the
UIDynamicAnimator class
5. THE REFERENCE VIEW
•
Interaction are to take place
•
This is typically the parent superclass view or
collection view of which the dynamic item views
are children.
7. DYNAMIC ITEMS
•
the view elements within the user interface that
are to be animated
•
includes the UIView and UICollectionView classes
and any subclasses there of (such as UIButton and
UILabel)
8. DYNAMIC BEHAVIORS
•
configure the behavior which is to be applied to one or more dynamic items
•
predefined dynamic behavior classes
•
UIAttachmentBehavior
•
UICollisionBehavior
•
UIGravityBehavior
•
UIDynamicItemBehavior
•
UIPushBehavior
•
•
The force can be specified as continuous or instantaneous
UISnapBehavior
9. EXAMPLE
Class *gravity = [[Class alloc]initWithItems:@[_view1, _view2]];
[self.animator addBehavior:gravity];
11. UIDynamicItemBehavior
•
AllowsRotation: Permitted to rotate during animation
•
AngularResistence: The higher the value, the faster the item will stop
rotating
•
Density: The mass of the item
•
Friction: It slides against another item
•
Resistence: The item will come to a complete stop during animation.
•
Elasticity: Item will bounce