I'm animating an UIImage
view with this code
CABasicAnimation *animation;
animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
animation.duration = 1;
animation.toValue = [NSNumber numberWithFloat:M_PI];
animation.fromValue = [NSNumber numberWithInt:0];
[square.layer addAnimation:animation forKey:@"rotation"];
All works fine but my array take his original position at the end of animation. I looked into the layer properties and found :
[square.layer setTransform:CATransform3DRotate(HERE, -M_PI, 0, 0, 0)];
And I don't know what to write instead of "HERE". Could you help me please? Thanks a lot !