0

これが呼ばれているものです:

-(IBAction)preform:(id)sender{
 CALayer *layer = [CALayer layer];
 [layer setPosition:CGPointMake(100.0, 100.0)];
 [layer setBounds:CGRectMake(0.0, 0.0, 50.0, 60.0)];
 [layer setBackgroundColor:[[UIColor redColor] CGColor]];
 [self.view.layer addSublayer:layer];

 CABasicAnimation *animation = [CABasicAnimation animation];
 [animation setFromValue:[NSValue valueWithCGPoint:CGPointMake(100.0, 100.0)]];
 animation.toValue = [NSValue valueWithCGPoint:CGPointMake(100.0, 250.0)];
 [layer addAnimation:animation forKey:@"position"];
}

これはエラーです。IOS アニメーションについてほとんど知識がなく、どうすればよいかわかりません。

http://i.stack.imgur.com/IMu0F.png

4

1 に答える 1

0

フレームワーク QuartzCore をプロジェクトに追加する必要があります..

ここに方法があります.. https://stackoverflow.com/a/6961788/1518182

于 2013-02-11T01:15:00.620 に答える