How to show split view controller on tab bar from different storyboard?

524 Views Asked by At

The below is my Main.storyboard and it is having tab bar controller. I wish to show a split view controller in one of the tabs of it. The splitVC is in other storyboard as shown in second picture

The below is my Main.storyboard and it is having tab bar controller. I wish to show a split view controller in one of the tabs of it. The splitVC is in other storyboard as shown in second picture

This is second storyboard which has a split view controller.

This is second storyboard which has a split view controller.

I am unable to show it in main storyboard using following approaches: • Using container view: I tried to show the splitVC in container view programatically but it is throwing error saying :ContainerView must have view controller at index 1 (I tried container view as shown in first picture.)

Can anyone suggest the best way to show it on tab bar ? Or if I am doing container approach not correctly?

1

There are 1 best solutions below

3
Koushik On

Hi @Divjyot Answers here might help apple recommends UISplitViewController should always be the rootviewcontroller

Here is the note from apple

You cannot push a split view controller onto a navigation stack. Although it is possible to install a split view controller as a child in some other container view controllers, doing is not recommended in most cases. Split view controllers are normally installed at the root of your app’s window. For tips and guidance about ways to implement your interface,