I've implemented a UIPageViewController in my iPad app. However, when the iPad is in portrait you can see all the pages, but when the iPad is in landscape you can’t see the last one, and if you are in the last page in portrait and change to landscape the app crashes with the following error:
Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘The >number of provided view controllers (1) doesn’t match the number required (2) for the >requested spine location (UIPageViewControllerSpineLocationMid)’
Because it needs 2 pages and there is only one.
What can I do when the “book” has an odd number of pages (7, for example) to avoid the previous exception?