Skip to content

About

UIKitDynamics <UIDynamicItem> working on a CALayer

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamicLayer

UIKit Dynamics <UIDynamicItem> working on a CALayer level, allowing both Auto Layout and UIKit Dynamics to coexist within the same view hierarchy. You can even apply dynamics to a view that is under direct control of Auto Layout.

Example :

self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
DynamicLayer *layerItem = [DynamicLayer with:self.someView];
UISnapBehavior *snap = [[UISnapBehavior alloc] initWithItem:layerItem snapToPoint:self.someView.center];
layerItem.center = CGPointApplyAffineTransform(layerItem.center, CGAffineTransformMakeTranslation(0, -500));
[self.animator addBehavior:snap];

About

UIKitDynamics <UIDynamicItem> working on a CALayer

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages