Question

I'm interested in using the new UIPageViewController class in a new treasure hunt iPhone app I'm creating. The page flip animation would look pretty sweet with treasure map clues, etc. One thing I did notice was that in iBooks, Apple has made it look like there are actually a stack of pages in order to provide UI affordance for flipping to the next page. This seems like a good idea to me.

The neat thing is that, in typical Apple attention to detail, the page flip animation does not start from the edge of the screen like in the page view controller examples I've seen, but it starts offset from the edge of the screen where the first page appears to be. That way you don't get the extra page graphic as part of the page being flipped and the following pages appear to stay in place.

Anybody have any idea how to do this sort of effect in our own apps that use the page view controller?

Was it helpful?

Solution

Just embed the UIPageViewController inside another UIViewController and set the frame to a part of the parent frame. With iOS5 embedding is finally easy. (see addChildViewController)

OTHER TIPS

There is initWithTransitionStyle: navigationOrientation: options: method in UIPageViewController. Just set some NSNumber (with float) for key UIPageViewControllerOptionInterPageSpacingKey in options dictionary. (iOS6 +)

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