How to change UIPageViewController direction of paging curl animation

一世执手 提交于 2019-11-27 18:46:41

问题


I need to display Arabic (Right To Left) content and couldn't find any method to rotate animation of the page curl found by UIPageViewController because basically Arabic books should be turned from Left to right.


回答1:


If you are supporting only portrait mode then you should look at the UIPageViewController delegate method pageViewController:spineLocationForInterfaceOrientation: and return UIPageViewControllerSpineLocationMax.

But if you want to support both landscape and portrait then you could keep the default spine location animations but provide the pages in the opposite direction than requested like this

In the : pageViewController:viewControllerBeforeViewController: return the next page and in the : pageViewController:viewControllerAfterViewController just return the previous one.



来源:https://stackoverflow.com/questions/9705332/how-to-change-uipageviewcontroller-direction-of-paging-curl-animation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!