如何更改UIPageViewController方向的分页卷曲动画 [英] How to change UIPageViewController direction of paging curl animation

查看:135
本文介绍了如何更改UIPageViewController方向的分页卷曲动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示阿拉伯语(从右到左)内容,找不到任何方法来旋转UIPageViewController找到的页面卷曲动画,因为基本上阿拉伯语书籍应该从左到右翻转。

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.

推荐答案

如果您只支持纵向模式,那么您应该查看 UIPageViewController委托方法 pageViewController:spineLocationForInterfaceOrientation:并返回 UIPageViewControllerSpineLocationMax

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

中:pageViewController:viewControllerBeforeViewController:返回下一页
并在中:pageViewController:viewControllerAfterViewController 只返回上一页。

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

这篇关于如何更改UIPageViewController方向的分页卷曲动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆