Skip to content

Commit

Permalink
Fix dark mode override
Browse files Browse the repository at this point in the history
  • Loading branch information
weiran committed Dec 5, 2021
1 parent 9654c16 commit 700e86c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
if ProcessInfo.processInfo.arguments.contains("skipAnimations") {
UIView.setAnimationsEnabled(false)
}
if ProcessInfo.processInfo.arguments.contains("darkMode") {
window?.overrideUserInterfaceStyle = .dark
}

// setup window and entry point
window = UIWindow()
Expand All @@ -36,6 +33,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window?.rootViewController = mainSplitViewController
window?.tintColor = AppTheme.default.appTintColor
window?.makeKeyAndVisible()

if ProcessInfo.processInfo.arguments.contains("darkMode") {
window?.overrideUserInterfaceStyle = .dark
}

// setup NavigationService
navigationService = SwinjectStoryboard.getService()
Expand Down

0 comments on commit 700e86c

Please sign in to comment.