由于这个原因应用程序崩溃-[NSConcreteValue doubleValue]: unrecognized selector sent to
在我的项目中使用了以下代码,我非常搜索并且我得到了由于变换的原因,但是如果我将 transform.scale 替换为它,那么动画更改对我有帮助!
[viewContent.layer addAnimation:[self getShakeAnimation] forKey:@"transform.scale"];
- (CAAnimation*)getShakeAnimation
{
CAKeyframeAnimation *animation = [CAKeyframeAnimation animation];
animation.values = [NSArray arrayWithObjects:
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_2, 0.0f, 1.0f, 0.0f)],
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 0.0f)],
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI * 2, 0.0f, 1.0f, 0.0f)],nil];
animation.duration = 0.8f;
animation.delegate = self;
return animation;
}