2012-11-18 43 views
1

我在玩UIPageViewController并使用UIPageViewController作为独立控制器,我需要的所有东西都像魅力一样工作。 我现在需要向PageController添加一些控制器,并且我实现了一个UIViewController并将所有内容添加到此ViewController。 一切工作perferctly除了UIPageViewController不通知设备旋转,因为它不是firstResponder。 我该如何解决它?我试图在viewWillRotateToInterfaceRotation中手动调用spinelocationForInterfaceOrientation,但它不是像我会...有没有人有任何提示?UIPiewController里面的UIPageViewController

谢谢

回答

0

是你的UIViewController UIPageViewController的一个委托吗?

如果没有,试试这个:

@interface YourViewController : UIViewController <UIPageViewControllerDelegate> 

并实现这一点:

- (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation 
相关问题