Skip to content

Instantly share code, notes, and snippets.

@aqubi
Created May 30, 2020 07:15
Show Gist options
  • Save aqubi/8cf1a5639ac585a4e1ca45ca0a41aa41 to your computer and use it in GitHub Desktop.
Save aqubi/8cf1a5639ac585a4e1ca45ca0a41aa41 to your computer and use it in GitHub Desktop.
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
if let navigation = primaryViewController as? UINavigationController, navigation.viewControllers.count == 1 {
return UIStoryboard(name: "Placeholder", bundle: nil).instantiateInitialViewController()
} else {
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment