Application crash due to this reason -[NSConcreteValue doubleValue]: unrecognized selector sent to
Following code is used in my project and I search very and I get the reason due to transform but if I replace transform.scale to it then animation changed
help me!
[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;
}
You’re adding an animation for the keypath
transform.scale(afloat) yet are passing inCATransform3Ds. You need to either correct your keypath or your input.