I tried adding a split view controller with triple column style to a UITabBarController and it shows up in collapsed state. The same code works fine when I use the older style of the split view controller. How do I get the 3-column split view controller to show up correctly on a tab bar controller?
class TabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
// This works fine ♂️
let splitViewController = SplitViewController()
splitViewController.viewControllers = [ UINavigationController(rootViewController: PrimaryViewController()) , UINavigationController(rootViewController: SecondaryViewController())]
// let splitViewController = SplitViewController(style: .tripleColumn)
// splitViewController.setViewController(UINavigationController(rootViewController: PrimaryViewController()), for: .primary)
// splitViewController.setViewController(UINavigationController(rootViewController: SecondViewController()), for: .secondary)
// splitViewController.setViewController(UINavigationController(rootViewController: SupplementaryViewController()), for: .supplementary)
// splitViewController.show(.primary)
// splitViewController.show(.secondary)
// splitViewController.show(.supplementary)
splitViewController.title = "First"
let secondViewController = SecondViewController()
secondViewController.title = "Second"
setViewControllers([
splitViewController,
secondViewController
], animated: false)
}
}
here is the link to the project: https://github.com/anirudhbandi96/SplitViewTest
This is how the new three column split view controller looks
This is how the old 2-column split view controller looks

