troubles with animation
I have a little problem, I have a viewcontroller with a webview and some button, I want to apply to webview a curl animation and see instad webview the view if the same controller.
like this
instead this
in the first case I use webview.hidden = YES but when I try to came back the view is (obviusly) hidde, if I put webview.hidden = NO on the method for come back 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 开发者_JS百科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"];
}
精彩评论