Created
November 1, 2019 14:30
-
-
Save Le0nX/71e2667a71c9358e0e2b716a4aec944c to your computer and use it in GitHub Desktop.
This file contains 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
import Foundation | |
import UIKit | |
class ThemeManager { | |
// Some hack is needed in ios 13 | |
// to make navigationBar color grey in largeTittle mode | |
static func setup() { | |
if #available(iOS 13.0, *) { | |
let navBarAppearance = UINavigationBarAppearance() | |
navBarAppearance.configureWithOpaqueBackground() | |
navBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] | |
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] | |
navBarAppearance.backgroundColor = UIColor.RGB(47,54,64) | |
UINavigationBar.appearance().standardAppearance = navBarAppearance | |
UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance | |
} else { | |
UINavigationBar.appearance().barTintColor = UIColor.RGB(47,54,64) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment