我一直在尝试以下,没有任何工作
NSDictionary *pageViewOptions = [NSDictionary dictionaryWithObjectsAndKeys:UIPageViewControllerOptionSpineLocationKey, [NSNumber numberWithInteger:UIPageViewControllerSpineLocationMid],nil];
NSLog(@"pageViewOptions :%@",pageViewOptions);
self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:pageViewOptions];
NSLog(@"spineLocation :%d",self.pageViewController.spineLocation);
Run Code Online (Sandbox Code Playgroud)
pageViewOptions的NSlog是2,spineLocation的NSlog是1.这让我起了墙,我想做的就是在中间用脊椎初始化.它始终在左侧初始化.应用程序初始化为横向,但只有在旋转设备180度之后方法" - (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController*)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation"工作,然后我在中间得到脊椎.有人可以对此有所了解.我到处寻找答案.
我想要它做的就是在中间用脊椎进行初始化