Fix iOS 15 nav bar appearance
This commit is contained in:
parent
5ff2d41d7c
commit
ea16391639
|
@ -27,6 +27,8 @@ extension AppDelegate: UIApplicationDelegate {
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||||
self.application = application
|
self.application = application
|
||||||
|
|
||||||
|
configureGlobalAppearance()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,3 +42,16 @@ extension AppDelegate: UIApplicationDelegate {
|
||||||
deviceTokenSubject.send(completion: .failure(error))
|
deviceTokenSubject.send(completion: .failure(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension AppDelegate {
|
||||||
|
func configureGlobalAppearance() {
|
||||||
|
if #available(iOS 15, *) {
|
||||||
|
let appearance = UINavigationBarAppearance()
|
||||||
|
|
||||||
|
appearance.configureWithDefaultBackground()
|
||||||
|
|
||||||
|
UINavigationBar.appearance().standardAppearance = appearance
|
||||||
|
UINavigationBar.appearance().scrollEdgeAppearance = appearance
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue