Ios 5 UIPageViewController changes scroll style

I am creating an e-book application, but it must be supported with ios5 and beyond. I want to do it quickly and efficiently. I plan to use the UIPageviewController, but for ios5 it only supports swirling animations, and I also need to support the scroll animation, as well as the page movements that we get on ios6. So, can I do this with ios5 using the page view controller, the content that I display is the images. Ideally, I like to use the page view controller, since it processes many of them myself, for example, turning the page, moving the page when you click on the page end area and its curl is better than the other available options. Please help, any suggestions are welcome.

+4
source share
3 answers

If anyone else has this problem, check out the R4PageViewController . It supports iOS 5, 6 and 7 and has iOS 7, for example, a scroll effect (which can be turned off).

+1
source

If you want a quick fix to use the following snippet to discover the current version of iOS and use transition styles accordingly:

#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")){ //UIPageViewControllerTransitionStyleScroll }else{ //UIPageViewControllerTransitionStylePageCurl } 
0
source

I had a similar problem and found a RAPageViewController . I reimplemented the Apple PhotoScroller sample with minimal changes. My repo is RAPageScroller .

0
source

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


All Articles