如何在我的基于View的应用程序中插入UISplitView

时间:2011-12-22 10:26:09

标签: iphone objective-c xcode ipad uisplitviewcontroller

我正在开发一个iPad应用程序,需要你们的帮助。

实际上我想在一个基于View的应用程序中使用UISplitView。

我的应用程序流程如下:

In main view:
When i Enter username and password and click Login, On Successfull login it should open the second screen using present model view controller.
Now on Second Screen there is a Button to goto Mails. When i click on it It should open up the 3rd screen. again pushed using presentModalViewController, which should have a UISplitViewController to show the emails list and when clicking on any email show the detail of that email.

现在请任何人指导我如何在Viewbased应用程序模板中使用uisplitView控制器。 至少发布任何使用完整链接/源代码文件。

提前致谢

1 个答案:

答案 0 :(得分:0)

SplitViewController必须是RootViewController。来自Apple Docs:

“拆分视图控制器必须始终是您创建的任何接口的根。换句话说,您必须始终从aUISplitViewController对象安装视图作为应用程序窗口的根视图。拆分视图界面的窗格可能然后包含导航控制器,标签栏控制器或实现界面所需的任何其他类型的视图控制器。“

因此,如果不编写自己的容器视图(在iOS5中)而不是使用Apple的SplitViewController,则无法执行您想要的操作。