Skip to content

Instantly share code, notes, and snippets.

@likil33
Created March 30, 2023 08:40
Show Gist options
  • Select an option

  • Save likil33/982b3fb4a029eafbef13689756eaad57 to your computer and use it in GitHub Desktop.

Select an option

Save likil33/982b3fb4a029eafbef13689756eaad57 to your computer and use it in GitHub Desktop.
let appearance = UINavigationBarAppearance()
let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
appearance.backgroundColor = .systemGreen
appearance.titleTextAttributes = textAttributes
self.navigationController?.navigationBar.standardAppearance = appearance
self.navigationController?.navigationBar.scrollEdgeAppearance = appearance
self.title = "USA Coastal Boat Ramps"
other stuff
self.navigationController?.navigationBar.barTintColor = UIColor(red: 0.0/255.0, green: 84.0/255.0, blue: 147.0/255.0, alpha: 1.0)
self.navigationController?.navigationBar.tintColor = UIColor.white
self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont(name: "Thonburi-Bold", size:20) as Any]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment