ios - 不是 rootViewController 的 UISplitViewController

标签 ios ipad uisplitviewcontroller

是的,我知道 Apple 不想这样做,但我想这样做。

我想使用另一个 UISplitViewController 作为模态视图 Controller 。

我通过谷歌搜索找到了一些解决方案,

  1. 制作您自己的UISplitViewController

    是的!它很简单,有些人已经实现了。

  2. 使用一个 UISplitViewController,并更改其 viewControllers 属性

    viewControllers 属性必须由堆栈管理,就像 UINavigationController 一样。

  3. 创建另一个 UIViewController,并为其分配来自 UISplitViewController 的 View 属性

    我制作了 MyViewController,它有来自 nib(或代码)的 UISplitViewController 实例

    MyViewController 中的 viewDidLoad 中:

    self.view = splitViewController.view
    

    我正在使用 MyViewController 作为模态视图 Controller 。

    它很好地显示了 UISplitViewController,但是 UISplitViewControllerDelegate 不起作用,因为它不是 Root View Controller 。

friend 们还有什么建议,或者有什么推荐的方式吗?

最佳答案

我刚刚发现以下内容,这似乎解决了我的主要问题(能够将 Split View用作导航 Controller 的 subview ):

http://www.codeproject.com/Articles/307008/Versatile-programmer-friendly-split-view-controlle

关于ios - 不是 rootViewController 的 UISplitViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7156201/

相关文章:

iphone - 将基于标签栏的 iPhone 项目迁移到 iPad

ios - Cocos2d View 在UISplitViewController中大小不正确

ios - 如何实现多种消耗品内购

ios - 如何查询特定对象的解析类?

iphone - 动画 UIView 比例为零

ios - UITabBar 图标在 iPad 上偏离中心

ios - 带有 UINavigationController 的 UISplitViewController 作为详细信息 View : push controller via Storyboard segue

ios - 如何使用 Game Center sendDataToAllPlayers 发送 UIBezierPath

ios - 在 Cocoapod 中集成 plcrashreporter?

iphone - 如何拍摄高质量的屏幕截图/保存图像?