Skip to content

Instantly share code, notes, and snippets.

@oalansari82
Created August 7, 2017 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oalansari82/eec9e25702209fe79691aa28792a34eb to your computer and use it in GitHub Desktop.
Save oalansari82/eec9e25702209fe79691aa28792a34eb to your computer and use it in GitHub Desktop.
Transparent NavigationBar in Swift 3
// Add the below code in AppDelegate.swift inside of didFinishLaunchingWithOptions function
UINavigationBar.appearance().barTintColor = UIColor.white
UINavigationBar.appearance().isTranslucent = true
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0)
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment