1

enter image description here

The image above is in dark mode, with the following setup in the app delegate:

if (@available(iOS 13.0, *)) {
    self.window.backgroundColor = [UIColor systemBackgroundColor];
}

The problem is that the top white should be black in dark mode.
How can I make that happen?

Thanks.

Zsolt
  • 3,648
  • 3
  • 32
  • 47

1 Answers1

1

Is it still the issue? Here is my code which redirect to initialViewController based on login status. And it is working.

if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
    appDelegate.window?.rootViewController = initialViewController
    appDelegate.window?.makeKeyAndVisible()

    if #available(iOS 13.0, *) {
         appDelegate.window?.backgroundColor = .systemBackground
    }else{
         appDelegate.window?.backgroundColor = .white // as you want
    }
 }
Santosh
  • 363
  • 2
  • 14