I added CALayer to the UIView of my application:
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:0.35];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.58;
[animation setRemovedOnCompletion:NO];
[[self.view layer] addAnimation:animation forKey:@"pageCurlAnimation"];
Now, when the user rotates the device, the layer always remains in the same position on the screen (in accordance with the button on the main screen). Is it possible to rotate an animation / layer? I tried
self.view.layer.transform = CGAffineTransformMakeRotation (angle);
but this code just rotates the UIView, not the animation / layer I set.
source
share