Palette navigation bar The article provides a Swift code extension for `UINavigationBar` that applies a custom theme using a `Palette` class. The `setTheme()` method configures the navigation bar's background, tint, and title text colors, and optionally enables large titles on iOS 11 and later. gistfile1.txt This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters extension UINavigationBar { func setTheme { barTintColor = Palette.secondaryBackgroundColor tintColor = Palette.accentColor titleTextAttributes = NSAttributedStringKey.foregroundColor: Palette.accentColor, NSAttributedStringKey.font: UIFont.systemFont ofSize: 20.0 if available iOS 11.0, { largeTitleTextAttributes = NSAttributedStringKey.foregroundColor: Palette.accentColor prefersLargeTitles = true } } }