简体   繁体   English

如何在纵向模式下制作UISplitViewController?

[英]How to make a UISplitViewController in portrait mode?

I want to make a UISplitViewController in portrait mode just like in the Settings app. 我想在纵向模式下创建一个UISplitViewController,就像在Settings应用程序中一样。 How can I do it? 我该怎么做?

A bit late, but also take a look at the MGSplitViewController by Matt Gemmel. 有点晚了,但还需要看看MGSplitViewController由马特·盖梅尔。 It does what you need and so much more. 它可以满足你的需求,还有更多。 It's what UISplitViewController should be, and it's a snap to implement. 这就是UISplitViewController应该是什么,并且实现起来很容易。

From the UISplitViewController class documentation: 从UISplitViewController类文档:

A split view controller supports the same interface orientations as its currently visible child view controllers. 拆分视图控制器支持与其当前可见的子视图控制器相同的接口方向。 Both view controllers are displayed in landscape orientations but only the detail view controller is displayed in portrait orientations. 两个视图控制器都以横向方向显示,但只有详细视图控制器以纵向显示。 When transitioning between orientations, the split view controller sends messages to its delegate object to coordinate the display of a popover with the hidden view controller. 在方向之间转换时,拆分视图控制器将消息发送到其委托对象,以协调弹出窗口与隐藏视图控制器的显示。 For more information on the methods of this delegate object, see UISplitViewControllerDelegate Protocol Reference. 有关此委托对象的方法的更多信息,请参阅UISplitViewControllerDelegate协议参考。

(Emphesis added.) (Emphesis补充说。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM