In your Info.plist add the following attribute:
View controller-based status bar appearance
and set its value to
NO
as described in the image below:
In your AppDelegate.swift file, in didFinishLaunchingWithOptions
method, add this code:
UIApplication.shared.statusBarStyle = .lightContent
or
UIApplication.shared.statusBarStyle = .default
The .lightContent option will set the colour of the statusBar to white, for the entire app.
The .default option will set the colour of the statusBar to
the original black colour, for the entire app.
Follow the first step from the SWIFT Section.
Then add this code to the AppDelegate.m file:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
or
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];