CALayerを特定の角度に回転させようとしていますが、アニメーションが完了すると、レイヤーは元の位置に戻ります。レイヤーを適切に回転させて、最終的な目的地にとどまるにはどうすればよいですか?
これが私が使用しているコードです
CABasicAnimation *rotationAnimation =[CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; //Rotate about z-axis
[rotationAnimation setFromValue:[NSNumber numberWithFloat:fromDegree]];
[rotationAnimation setToValue:[NSNumber numberWithFloat:toDegree]];
[rotationAnimation setDuration:0.2];
[rotationAnimation setRemovedOnCompletion:YES];
[rotationAnimation setFillMode:kCAFillModeForwards];
助言がありますか?ありがとうございました。