动画组 运行时崩溃
代码如下
__block NSMutableArray *animaArr = [[NSMutableArray alloc] initWithCapacity:200];
for ( int i = 3 ; i > 0 ; i-- ) {
CAKeyframeAnimation *anima1 = [CAKeyframeAnimation animationWithKeyPath:@"position"];
NSValue *value0 = [NSValue valueWithCGPoint:CGPointMake(30,40)];
NSValue *value1 = [NSValue valueWithCGPoint:CGPointMake(50,60)];
anima1.values = [NSArray arrayWithObjects:value0,value1, nil];
[animaArr addObject:anima1.values];
}
CAAnimationGroup *groupAnimation = [CAAnimationGroup animation];
groupAnimation.animations = animaArr;
groupAnimation.duration = 5;
[_movingChipImgView.layer addAnimation:groupAnimation forKey:nil];
崩溃信息
-[__NSArrayI setDefaultDuration:]: unrecognized selector sent to instance 0x608000222800
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
[animaArr addObject:anima1.values];
==>[animaArr addObject:anima1];