Tutorial by Examples

Objective-C CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position.x"]; animation.fromValue = @0; animation.toValue = @320; animation.duration = 1; [_label.layer addAnimation:animation forKey:@"basic"]; Swift let animation = CAB...
OBJECTIVE-C CATransition* transition = [CATransition animation]; transition.startProgress = 0; transition.endProgress = 1.0; transition.type = @"flip"; transition.subtype = @"fromLeft"; transition.duration = 0.8; transition.repeatCount = 5; [_label.layer addAnimation:tran...
CGRect boundingRect = CGRectMake(-150, -150, 300, 300); CAKeyframeAnimation *orbit = [CAKeyframeAnimation animation]; orbit.keyPath = @"position"; orbit.path = CFAutorelease(CGPathCreateWithEllipseInRect(boundingRect, NULL)); orbit.duration = 4; orbit.additive = YES; orbit.repeatC...
Objective-C CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position.x"]; animation.values = @[ @0, @10, @-10, @10, @0 ]; animation.keyTimes = @[ @0, @(1 / 6.0), @(3 / 6.0), @(5 / 6.0), @1 ]; animation.duration = 0.4; animation.additive = YES; [_label.lay...
Objective C CATransition *animation = [CATransition animation]; [animation setSubtype:kCATransitionFromRight];//kCATransitionFromLeft [animation setDuration:0.5]; [animation setType:kCATransitionPush]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEa...

Page 1 of 1