Nassif
Nassif

Reputation: 1223

UIPageViewController delegate not firing for landscape orientation

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

Answers (1)

Karim Baidar
Karim Baidar

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

Related Questions