//Explicit hidden
Cabasicanimation *capacityanimation = [cabasicanimation animationwithkeypath:@ "opacity"];
Capacityanimation.fromvalue = @1;
Capacityanimation.tovalue = @0;
//Zoom in and zoom out
Cabasicanimation *scaleaniamation = [cabasicanimation animationwithkeypath:@ "Transform.scale"];
Scaleaniamation.fromvalue = @0.5;
Scaleaniamation.tovalue = @1.5;
//Mobile
Cabasicanimation *moveanimation = [cabasicanimation animationwithkeypath:@ "position"];
Moveanimation.tovalue = [Nsvalue valuewithcgpoint:cgpointmake (200, 200)];
//Rotate
Cabasicanimation *rotateaniamation = [cabasicanimation animationwithkeypath:@ "transform"];
Rotateaniamation.fromvalue = [Nsvalue valuewithcatransform3d:catransform3didentity];
Rotateaniamation.tovalue = [Nsvalue valuewithcatransform3d:catransform3drotate (_layer.transform, M_PI, 0.3, 0.5, 1)];
Add animations
[Catransaction setanimationduration:1.0];//Animation speed
[_layer addanimation:capacityanimation Forkey:nil];
[_layer addanimation:scaleaniamation Forkey:nil];
[_layer addanimation:moveanimation Forkey:nil];
[_layer addanimation:rotateaniamation Forkey:nil];
//Group animation
Caanimationgroup *group = [Caanimationgroup animation];
Group.duration = 1;
Group.removedoncompletion = NO;
Group.fillmode = Kcafillmodeforwards;
Group.timingfunction = [Camediatimingfunction Functionwithname:kcamediatimingfunctioneasein];
Group.animations = @[capacityanimation,scaleaniamation,moveanimation,rotateaniamation];
[_layer Addanimation:group Forkey:nil];
There are more details and advanced applications for core animation: https://zsisme.gitbooks.io/ios-/content/chapter1/the-layer-tree.html
0125--Animation 2