mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 01:31:02 +00:00
Fix iOS 15 nav bar appearance
This commit is contained in:
parent
5ff2d41d7c
commit
ea16391639
1 changed files with 15 additions and 0 deletions
|
@ -27,6 +27,8 @@ extension AppDelegate: UIApplicationDelegate {
|
|||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
self.application = application
|
||||
|
||||
configureGlobalAppearance()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -40,3 +42,16 @@ extension AppDelegate: UIApplicationDelegate {
|
|||
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 a new issue