How to create a UIPageViewController animation that has an offset edge for page accessibility?

I am interested in using the new UIPageViewController class in the new treasure hunt iPhone application that I create. Flip page animation would look pretty sweet with treasure map tips, etc. One thing I noticed is that Apple showed on iBooks that there really is a stack of pages to make the user interface accessible to go to the next page, It seems like a good idea to me.

The optimal thing is that with a typical Apple look at the details, the animation of the flip page does not start from the edge of the screen, as in the examples of the page view controller that I saw, but it starts to shift from the edge on which the first page appears. This way, you will not get an additional graphic object, because part of the page is turned upside down and the following pages are displayed in place.

Does anyone know how to make this effect in our own applications that use the pageview controller?

+4
source share
2 answers

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

+2
source

The UIPageViewController has an initWithTransitionStyle: navigationOrientation: options: method. Just set NSNumber (with float) for the UIPageViewControllerOptionInterPageSpacingKey key in the parameter dictionary. (iOS6 +)

0
source

Source: https://habr.com/ru/post/1384372/


All Articles