CoreGraphics と QuartzCore フレームワークをプロジェクトにインポートする必要があります。
これらの行をファイルの先頭に追加します。
#import <QuartzCore/QuartzCore.h>
#import <CoreGraphics/CoreGraphics.h>
...
UIImageView *bird = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bird2.png"]];
CALayer *b = bird.layer;
// Create a keyframe animation to follow a path to the projected point
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"scale"];
animation.removedOnCompletion = NO;
// Create the path for the bounces
CGMutablePathRef thePath = CGPathCreateMutable();
// Start the path at my current location
CGPathMoveToPoint(thePath, NULL, bird.center.x, bird.center.y);
CGPathAddLineToPoint(thePath, NULL,20, 500.0);
/* // very cool path system.
CGMutablePathRef thePath = CGPathCreateMutable();
CGPathMoveToPoint(thePath,NULL,74.0,74.0);
CGPathAddCurveToPoint(thePath,NULL,74.0,500.0,
320.0,500.0,
320.0,74.0);
CGPathAddCurveToPoint(thePath,NULL,320.0,500.0,
566.0,500.0,
566.0,74.0);
*/
//animation.rotationMode = kCAAnimationRotateAuto;
animation.path = thePath;
animation.speed = 0.011;
//animation.delegate = self;
animation.repeatCount = 1000000;
// Add the animation to the layer
[b addAnimation:animation forKey:@"move"];
それが少し役立つことを願っています。