In my project I'm using page animation. My problem is that I want to show red colour on the background of curled view. How do I achieve that? Thanks in advance.
CATransition *animation = [CATransition animation];
[animation setDelegate:self]; [animation setDuration:0.75];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.65;
[animation setRemovedOnCompletion:NO];
[[self view] exchangeSubviewAtIndex:[self.view.subviews count]-2 withSubviewAtIndex:3];
[[self view] exchangeSubviewAtIndex:[self.view.subviews count]-3 withSubviewAtIndex:2];
[[[self view] layer] addAnimation:animation forKey:@"pageCurlAnimation"];
This is how I change my view.
This is possible if you use CALayer as the background page when animation is happening.
topPageReverseOverlay = [[CALayer alloc] init];
topPageReverseOverlay.backgroundColor = [[[UIColor redColor] colorWithAlphaComponent:0.8] CGColor];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With