How to Change iOS Device’s (iPhone, iPad and iPod touch) Status Bar text colour using Swift Development Language in Xcode

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

 
iOS App Xcode Info PLIST Bundle creator OS Type Code

 
View controller-based status bar appearance added in Info.plist

 
View controller-based status bar appearance

 
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

Mandar Apte

This website contains a design articles blog by Mandar Apte. He writes and shares his iOS development, graphic, web, & animation film design experience through articles. Mandar is Mumbai based multi-disciplinary designer with expertise in UI, UX, Logo, Symbol, and Brand Identity design. He is an alumnus of Sir J. J. Institute of Applied Art, Mumbai. He currently runs his studio in the heart of the city of Mumbai.

One thought on “How to Change iOS Device’s (iPhone, iPad and iPod touch) Status Bar text colour using Swift Development Language in Xcode

  1. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *