Let’s get started & know what is the exact requirement before we proceed for solution.
Assumption: I assume that you want to have Status Bar text colour to be white as your Navigation Bar background is in dark colour. I also assume that you are developing your iOS app with latest version of iOS 9 or higher & latest version Swift & Xcode
Step 01: Click on your Project icon in your ‘Project Navigator’ tab in your respective projects left panel ‘Navigator’ tab.
Step 02: Select your project title under ‘Targets’
Step 03: Select ‘Info’ tab
Step 04: As shown in below image under ‘Custom iOS Target Properties’ select & mouse over ‘Bundle creator OS Type Code’ & click on Plus i.e. ’+’ sign. Now in dropdown scroll to the bottom and select where it is mentioned ‘View controller-based status bar appearance’. Set it’s value to ‘No’
Bundle creator OS Type Code Select & Shown in Below Image
View controller-based status bar appearance added in Info.plist
Step 05: Now navigate to AppDelegate.swift file & now paste following code to ‘didFinishLaunchingWithOptions’ function
UIApplication.sharedApplication().statusBarStyle = .LightContent
Step 06: Now run your app on your device or simulator you should see Status Bar text in white colour.
Mission Accomplished…!!!
Hope it helps,
Thanks & Regards
Mandar Apte
Well that was easy. I was trying to figure this out forever and couldn’t get it. Now I feel silly.
Oh well, at least I know now. Thanks for the guide!