Question

I am trying to use a UIPageViewController to create a book app. Each page currently has its own viewcontroller and Nib and has its own set of unique features. I am not using Storyboarding since there are over 40 pages to the book app.

I have had a hard time finding out how to use NIBS (with their view controllers) with UIPageViewController. The UIPageViewController will switch to the desired viewcontroller/NIB, but will then not respond to any of the UIPageViewController gestures.

Is there an example of using the UIPageViewController with NIBs that might help?

Any thoughts? Thanks for your help!

Was it helpful?

Solution

Yes. You can use nibs with UIPageViewController. Without storyboarding. See this: http://www.ioslearner.com/implementing-uipageviewcontroller-programatically-without-storyboarding/

OTHER TIPS

This was a very nice tutorial: http://www.techotopia.com/index.php/Implementing_a_Page_based_iOS_5_iPhone_Application_using_UIPageViewController

As an added bonus, it deals with Xcode 4.2 details, like de-selecting storyboard on project creation.

My guess is that you forgot to retain your UIPageViewController object. That happened to me the very first time too! The result is that the initial page(s) display but you don't get gestures, because the page view controller no longer exists. Stuff the page view controller into an instance variable with a strong/retain policy right after you obtain it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top