Changing the status bar style for the entire application
suggest changeSWIFT:
Step 1:
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:
Step 2:
In your AppDelegate.swift file, in didFinishLaunchingWithOptions method, add this code:
UIApplication.shared.statusBarStyle = .lightContent
or
UIApplication.shared.statusBarStyle = .default
.lightContentdraws the status bar text and icons in white for the whole app. It does not change the status bar background..defaultdraws that content in the default dark color for the whole app.
OBJECTIVE-C:
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];
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents