Ios 一个视图控制器的RTL语言uipageviewcontroller卷曲动画

Ios 一个视图控制器的RTL语言uipageviewcontroller卷曲动画,ios,objective-c,uipageviewcontroller,Ios,Objective C,Uipageviewcontroller,我需要执行uipageviewcontroller从右到左的转换。所以我看了一些例子。但不同的是,我一次只能显示一个viewcontroller,而pageViewController:spineLocationForInterfaceOrientation:只能返回UIPageViewControllerSpineLocationMin,不能返回UIPageViewControllerSpineLocationMax。这就是我到目前为止所做的 如何使用UIPageViewController

我需要执行uipageviewcontroller从右到左的转换。所以我看了一些例子。但不同的是,我一次只能显示一个viewcontroller,而pageViewController:spineLocationForInterfaceOrientation:只能返回UIPageViewControllerSpineLocationMin,不能返回UIPageViewControllerSpineLocationMax。这就是我到目前为止所做的

如何使用UIPageViewControllerSpineLocationMin使卷曲正常工作?。此外,我无法使用基于页面的应用程序模板。

基于我找到的解决方案。这是代码

- (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation {
UIViewController *currentViewController = [self.pageController.viewControllers objectAtIndex:0];
NSArray *viewControllers = [NSArray arrayWithObject:currentViewController];
[self.pageController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL];

self.pageController.doubleSided = NO;
return UIPageViewControllerSpineLocationMax;
}
- (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation {
UIViewController *currentViewController = [self.pageController.viewControllers objectAtIndex:0];
NSArray *viewControllers = [NSArray arrayWithObject:currentViewController];
[self.pageController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL];

self.pageController.doubleSided = NO;
return UIPageViewControllerSpineLocationMax;
}