Adding
application.statusBarStyle = .lightContent
to my AppDelegate\'s didFinishLaunchingWithOptions method nor adding
ove
If you choose a same status bar color for each View Controller:
UIViewControllerBasedStatusBarAppearance
Ad this to your Info.plist and set status bar color from Project -> Targets -> Status Bar Style by desired color.
On the other hand, in your case, you have a navigation controller which is embedded in a view controller. Therefore, you want to different status bar color for each page.
UIViewControllerBasedStatusBarAppearance
Ad this to your Info.plist. Then, create a custom class for your NavigationController. After that you can implement the method:
class LightContentNavigationController: UINavigationController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
}
Thats it! Please, inform me whether this was useful!