how can i add splitview to my viewbased app in ipad coding

前端 未结 3 1843
梦如初夏
梦如初夏 2021-01-07 09:20

I am Started my iPad app using View-Based application. in first two views i added table views. Now as the third view i want add splitView to the view, for this purpose i add

3条回答
  •  独厮守ぢ
    2021-01-07 09:48

    The SplitViewController has to be the RootViewController. From Apple Docs:

    "A split view controller must always be the root of any interface you create. In other words, you must always install the view from aUISplitViewController object as the root view of your application’s window. The panes of your split-view interface may then contain navigation controllers, tab bar controllers, or any other type of view controller you need to implement your interface."

    So you cannot do what you want without writing your own container views (in iOS5) instead of using Apple' SplitViewController.

提交回复
热议问题