Pregunta

There are a couple of explanations on how UIPageViewControllers work, and I have read them. I have built an app based on the approach in Neil Smyth's excellent 'iPhone iOS 6 Development Essentials" in chapter 28. It is elegant and simple.

It seems a relatively simple thing to add a method to this class, and a button to the main app view, to cause the UIPageViewController to turn to a specific page. But I cannot quite see the beset way to do this.

If someone could point me to the solution -- or tell me how to add a method that would I think use the provided "viewControllerAtIndex:" method cause the page turn i want.

Seeing this done (exactly what code codes where) in that app would help me understand and point the way to a solution in my own app.

thanks everyone sorry i know this should be obvious from the ansers to the likes of this question link but i am not quite getting it.

No hay solución correcta

Otros consejos

As noted in my comment I can close this question as I've found a good solution. As I wanted both "skip ahead" and "skip back" as well as "jump to page", I used a solution that involved specifying the top level View Controller as a delegate to content view controller, keeping track of the current page, and then passing the clicks on contentViewController back up to the implementation of the top level controller (as delegate) to move to the new page(s).

I have posted the source code for this solution as part of the "A-B-C Picture Book" source code. This app is in the app store; see https://itunes.apple.com/us/app/a-b-c-picture-book/id578864421?ls=1&mt=8.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top