Stick UISplitViewController in its own XIB?

后端 未结 3 430
生来不讨喜
生来不讨喜 2021-01-21 04:30

my iPad app starts with a normal UIView showing a login. After the user logged in the screen is supposed to switch to a split view. XCode\'s SplitViewTemplate (and all examples

相关标签:
3条回答
  • 2021-01-21 04:42

    maybe not the answer to your question but I have in my App also a login window. What I do is to put the login view above - in my case - TabBar.

    0 讨论(0)
  • 2021-01-21 04:45

    I found this post. Best way to switch between UISplitViewController and other view controllers? It seems it really is not supposed to work. You have to put it in the main xib and then apply tricks...

    0 讨论(0)
  • 2021-01-21 04:53

    You can put a UISplitViewController into a different XIB. You cannot have it be the owner, but you can have your app's delegate be the owner and load it when it removes the login view.

    1. Add UISplitViewController IBOutlet to app delegate
    2. Create a new, empty XIB for iPad
    3. Set the File's Owner to your app delegate class
    4. Add a UISplitViewController, connect to outlet in delegate
    5. Add views to split vew controller

    Then, you just have to handle your login in the app delegate, load the new XIB, and display it.

    0 讨论(0)
提交回复
热议问题