Avatar ·

How to change the text color of the Status Bar in iOS (Swift)

Hello everyone! I'm a beginner in iOS development with Swift and I've encountered a problem that I can't seem to solve. I have an app with a dark background on the main screen. I'm using a UINavigationController embedded via Storyboard. The problem is that the Status Bar displays black text on a dark background, making it almost invisible. I need to make the text white. I've tried different methods, but nothing works. Here's what I've already tried: 1. In Info.plist, I added `UIViewControllerBasedStatusBarAppearance = NO` and set `UIStatusBarStyle = UIStatusBarStyleLightContent`. It didn't help. 2. In AppDelegate, in the `application(_:didFinishLaunchingWithOptions:)` method, I wrote: ```swift UIApplication.shared.statusBarStyle = .lightContent ``` But Xcode says that this method