SkillAgentSearch skills...

DynamicLayer

UIKitDynamics <UIDynamicItem> working on a CALayer

Install / Use

/learn @foFox/DynamicLayer
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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];

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated2y ago
Forks0

Languages

Objective-C

Security Score

70/100

Audited on Nov 7, 2023

No findings