Just started with Swift and would like to replicate some functionality present in the standard Apple 'Notes' app. Specifically the Expand button that appears in the Details View when on iPad in landscape mode.
i.e.
The closest I have come (as a simple quick solution) is to add the following into AppDelegate:
splitViewController.preferredDisplayMode = .primaryOverlay
However although this allows for toggling the Master View in landscape orientation (similar to the default portrait behaviour), it is done with the Master View as a popover/overlay. I however would prefer the behaviour present in the Notes app in that the Master View slides in/out (without overlaying the Detail View).
Edit: also interested in how to only show the corresponding button only in Landscape mode while on iPad.
Any help would be greatly appreciated! Thanks
splitViewController.preferredDisplayMode = .allVisible
This should do the trick. It makes the Master View
slide in and out when toggling to fullscreen mode.