I've set up a UISplitViewController with style .tripleColumn.
let splitViewController = UISplitViewController(style: .tripleColumn)
preferredDisplayMode = .twoBesideSecondary
preferredSplitBehavior = .tile
For the first menu item "My Stories" it needs three columns. However, for all the other menu items it should only be the primary column (sidebar) and the content visible. The .supplementary column should be hidden.
When clicking on "My stats" for example, the following code hides both the .primary (sidebar) and .supplementary column and only shows "My Stats".
splitViewController?.showDetailViewController(stats, sender: nil)
splitViewController?.hide(.supplementary)
How can I switch to a .twoColumn style and only have the .primary and .secondary column visible?

In a
.tripleColumnsplit view controller, by design, it is impossible for the.primarycolumn to appear without also showing the.supplementarycolumn.And you cannot change one and the same split view controller from being a
.tripleColumnto being a.doubleColumn. I suppose you could just rip the entire split view controller right out of the interface and substitute a different one, but is that really what you want to do? I think it would be better to use the split view controller the way it is designed to be used.