我如何顯示ModalTransitionStyle像這樣?我如何顯示UIViewAnimationOptionTransitionCurl(MapCurl)?
我想顯示自己隅正如我所說的圖片。
如果我碰角,想開next查看....
我如何顯示ModalTransitionStyle像這樣?我如何顯示UIViewAnimationOptionTransitionCurl(MapCurl)?
我想顯示自己隅正如我所說的圖片。
如果我碰角,想開next查看....
-(void)goToPage{
//do stuff...
// start the animated transition
[UIView beginAnimations:@"page transition" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:flipUp ? UIViewAnimationTransitionCurlUp : UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
//insert your new subview
//[self.view insertSubview:currentPage.view atIndex:self.view.subviews.count];
// commit the transition animation
[UIView commitAnimations];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
UIView* view = viewController.view;
view.frame = self.view.window.bounds;
[UIView transitionWithView:self.view.window
duration:0.2
options:UIViewAnimationOptionTransitionCurlUp
animations:^(void) {
[self.view.window addSubview:view];
}
completion:^(BOOL finished) {
[viewController.view removeFromSuperview];
[viewController presentModalViewController:viewController
animated:NO];
}];
enter code here
它使用UIPageViewController。看到這裏:http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html 我用它在我們的應用程序之一,它正在工作。