【问题标题】:Error on first CAAnimation Program第一个 CAAnimation 程序出错
【发布时间】: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动画知之甚少,不知道该怎么做

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

【问题讨论】:

    标签: ios cocoa-touch caanimation


    【解决方案1】:

    您必须将框架 QuartzCore 添加到您的项目中..

    这里是如何..https://stackoverflow.com/a/6961788/1518182

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多