Reputation: 773
I am developing a project with many view controllers showing different controls and images in seperate xibs. I need to navigate through these views(Xibs) with page turning animation. Any help is appreciated.
the below code gives me page CURL animation but i require the page turning effect as seen in the leaves.
-(void)swipeLeftGesture:(UISwipeGestureRecognizer *)sender{
pp2ViewController * viewController = [[pp2ViewController alloc] initWithNibName:@"pp2ViewController" bundle:nil];
[UIView transitionWithView:self.view.window
duration:1.0f
options:UIViewAnimationOptionTransitionCurlUp
animations:^{
//[self.navigationController pushViewController:viewController animated:NO];
[self presentViewController:viewController animated:NO completion:nil];
}
completion:NULL];
}
Upvotes: 0
Views: 110
Reputation: 45598
You will have the best results by using UIPageViewController
with the UIPageViewControllerTransitionStylePageCurl
transition style.
The page view controller has a nice API and deals with a lot of the messy work of creating/destroying view controllers and managing rotation, scrolling/paging transitions etc.
Upvotes: 1