I have a UISplitViewController where I want to always display the master and detail view controllers for iPads. This line takes care of that for me:
// Always display master and detail in large screens
self.preferredDisplayMode = UISplitViewControllerDisplayMode.AllVisible
In the prepareForSegue, when opening up the detail view controllers, I have the following lines of code for the Back Button
controller.navigationItem.leftBarButtonItem = self.splitViewController?.displayModeButtonItem()
controller.navigationItem.leftItemsSupplementBackButton = true
Now when the user pressed that back button, I will want to perform an action after the Master view controller is hidden. I am not having any luck finding how to do that. In the SplitViewControllerDelegate I attempted to use:
func splitViewController(svc: UISplitViewController, willChangeToDisplayMode displayMode: UISplitViewControllerDisplayMode)
But that function is called before the Detail view controller becomes full screen. Is there a function or something else I can do to help notify me when the UISplitViewController finishes hiding the Master View?