Change Status bar color for non-UINavigationBar iOS

Mr.Javed Multani
1 min readOct 3, 2020

1. In info.plist set View controller-based status bar appearance to YES
2. In view controllers not contained by UINavigationController implement this method.

In Objective-C:

- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}

In Swift:

override func preferredStatusBarStyle() -> UIStatusBarStyle {
return UIStatusBarStyle.LightContent
}
Mr.Javed Multani

iOS Developer, Triple graduated, Passionate, Love workout, blogger