4
我一直在嘗試以下,並沒有什麼工作UIPageViewController和景觀
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);
的NSLog的在pageViewOptions是2,在NSLog的是spineLocation 1.這是推動我逼瘋了,我想要做的是在脊柱中間初始化。它總是在左邊初始化。該應用程序被初始化景觀,但只有旋轉設備180度的方法 後「 - (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)方向」 作品,然後我得到的中間脊椎。有人可以請說明這一點。我到處尋找答案。
所有我希望它做的是在景觀初始化與脊椎中間