Reputation: 1223
I am using a uipageviewcontroller to show some list of viewcontrollers.Everything is working fine in protrait ,all the delegate and datasources method are fired in the portrait mode.But if i rotate the device to landscape orientation the delegate methods are not fired.Say
- (void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray *)pendingViewControllers
is not fired.
Upvotes: 0
Views: 217
Reputation: 559
Every time the orientation changes you need to again set the view controller
WeightPageContentViewController *startingViewController = [self viewControllerAtIndex:currentViewControllerIndex];
NSArray *viewControllers = @[startingViewController];
[self.weightPageViewController setViewControllers:viewControllers direction:UIPage
Upvotes: 1