Skip to content

Instantly share code, notes, and snippets.

View kenmaready's full-sized avatar
:octocat:
Coding!

ken kenmaready

:octocat:
Coding!
View GitHub Profile
@kenmaready
kenmaready / gist:c61a801b677eede59f28029c8fe3f68d
Last active July 30, 2022 13:06
Change color of nav bar and status bar inside viewDidLoad in iOS Apps
View gist:c61a801b677eede59f28029c8fe3f68d
// inside viewDidLoad() or wherever you set appearance of your navigation bar:
let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground()
appearance.backgroundColor = UIColor.systemBlue
appearance.titleTextAttributes = [.foregroundColor: UIColor.white]
navigationItem.standardAppearance = appearance
navigationItem.scrollEdgeAppearance = appearance