0

I am trying to make a Split View Controller in Portrait show the master pane initially (without having to swipe or press a button). Is this possible?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Have you looked at the `displayMode` property? – rmaddy Aug 13 '17 at 21:43
  • @rmaddy I use the `displayMode` property to hide the master pane after the user taps a search result in portrait. Then, I reset it to `.automatic` so it doesn't stay hidden when the user switches to landscape. Perhaps, I need to set the `displayMode` to `.primaryOverlay` in `didFinishLaunchingWithOptions`. Any suggestions? –  Aug 13 '17 at 23:35

1 Answers1

0

I solved this issue by adding the following code to didFinishLaunchingWithOptions:

splitViewController.preferredDisplayMode = .primaryOverlay