ios - SplitViewController 显示 iPad Pro 纵向模式的细节

标签 ios swift uisplitviewcontroller

SplitViewController 在 iPad Pro 纵向模式下首次启动时仅显示细节 Controller

它应该在纵向模式下同时显示主 Controller 和细节 Controller

预览:

拖动前(首次启动应用)

Before Dragging 从左侧拖动后

After dragging from left side

帮助我,因为我是第一次使用拆分 Controller

提前致谢

最佳答案

请在您的 DetailViewController 中尝试此操作

override func viewWillAppear(_ animated: Bool) {
        self.splitViewController?.preferredDisplayMode = .allVisible
    }

谢谢!

关于ios - SplitViewController 显示 iPad Pro 纵向模式的细节,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51324026/

相关文章:

android - 如何设置平台以开发具有 Windows 和 Java 知识的 iOS 应用程序

swift - 处理算术溢出 UInt32 (CUnsignedInt)

ios - 在 ipad 中关闭 ModalView 后调用 MasterView 中的函数

ios - 从 UITabBarController 应用程序中的另一个 UIViewController 调用 UISplitViewController

ios - iPad UISplitViewController : Expand master instead of detail full screen?

iOS - 如何在客户端服务器聊天应用程序中正确使用后台获取和远程通知?

ios - 等待 UIImage

iphone - 如何在 if 语句中检查 UILabel 的值是否大于 0?

swift - 如何创建表格 View 部分之间的间距? (每个部分的页眉和页脚已经是自定义 View )

ios - 打印变量 Unwind Segue - Xcode 8.0 Swift 3.0