Graphics Programs Reference
In-Depth Information
[mover setFromValue:[NSValue valueWithCGPoint:CGPointMake(0.0, 100.0)]];
[mover setToValue:[NSValue valueWithCGPoint:CGPointMake(100.0, 100.0)]];
CABasicAnimation *fader = [CABasicAnimation animationWithKeyPath:@"opacity"];
[fader setDuration:1.0];
[fader setFromValue:[NSNumber numberWithFloat:1.0]];
[fader setToValue:[NSNumber numberWithFloat:1.0]];
CAAnimationGroup *group = [CAAnimationGroup animation];
[group setAnimations:[NSArray arrayWithObjects:fader, mover, nil]];
CATransition
animates layers as they are transitioning on and off the screen. On Mac
OS X,
CATransition
is made very powerful by Core Image Filters. In iOS, it can only
do a couple of simple transitions like fading and sliding. (
CATransition
is used by
UINavigationController
when pushing a view controller's view onto the screen.)