I have a little problem, I have a webcontrol viewcontroller and some button, I want to apply curl animation to webview and see instad webview view if the same controller.
like this

instead of this

in the first case, I use webview.hidden = YES, but when I try to return to the (obviusly) hidde view, if I put webview.hidden = NO in the method to return, I get this

any solution?
this is my code:
- (IBAction)toggleView:(id)sender {
CATransition *animation = [CATransition animation];
[animation setDelegate:self.view];
[animation setDuration:0.7];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.7;
[animation setRemovedOnCompletion:NO];
[[self.vistaWeb layer] addAnimation:animation forKey:@"pageCurlAnimation"];
}
- (IBAction) torna {
CATransition *animation = [CATransition animation];
[animation setDelegate:self.view];
[animation setDuration:0.7];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.7;
animation.endProgress = 0;
[animation setRemovedOnCompletion:NO];
[[self.vistaWeb layer] addAnimation:animation forKey:@"pageCurlAnimation"];
}
source
share