【问题标题】:UIPageViewController inside a UIViewControllerUIViewController 内的 UIPageViewController
【发布时间】:2012-11-18 21:15:58
【问题描述】:

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

谢谢

【问题讨论】:

    标签: iphone ios6 uipageviewcontroller


    【解决方案1】:

    你的 UIViewController 是 UIPageViewController 的代表吗?

    如果没有,试试这个:

    @interface YourViewController : UIViewController <UIPageViewControllerDelegate>
    

    并实施:

    - (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多