Skip to content

Instantly share code, notes, and snippets.

@LeoAOliveira
Created April 7, 2020 16:26
Show Gist options
  • Save LeoAOliveira/d76f35e74e08b4b08087a72827bdf488 to your computer and use it in GitHub Desktop.
Save LeoAOliveira/d76f35e74e08b4b08087a72827bdf488 to your computer and use it in GitHub Desktop.
Fundo translúcido para a View Controller primária
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let splitViewController = window!.rootViewController as! UISplitViewController
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
// Add a translucent background to the primary view controller.
splitViewController.primaryBackgroundStyle = .sidebar
splitViewController.delegate = self
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment