How to show the Master View button in a UISplitViewController app

I was tinkering with an iPad version of one of my apps, when I noticed that the nav bar button that hides and shows the Master View Controller in portrait mode was no longer displayed. You know, the one that reads “Master” by default.

This is a problem if my app starts in portrait mode, because there’s no way to bring this button back. The Split View Controller handles that button in its willHideViewController delegate method – which was seemingly never called upon startup (anymore).

I can’t call that method manually on startup because I don’t have the parameters that call this method – but I did find a solution that forces the Split View to call this method:

Calling this somewhere in viewDidLoad doesn’t hurt your app – but it avoids having to solve The Case of the Disappearing Split View Button.

About Jay Versluis

Jay is a medical miracle known as Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.