【发布时间】:2013-02-11 01:08:10
【问题描述】:
这就是所谓的:
-(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动画知之甚少,不知道该怎么做
【问题讨论】:
标签: ios cocoa-touch caanimation