06-25-2008, 04:24 PM
#1 (permalink )
Sean
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
How to: Change Color/Style of the iPhone Status Bar
Hi All,
I was wondering if anyone could provide me with a step by step explanation of how to change the status bar's color in my iPhone application to BlackOpaque. Any help would be much appreciated!
06-25-2008, 04:53 PM
#2 (permalink )
New Member
Join Date: Jun 2008
Location: North Yorkshire, UK
Age: 27
Posts: 75
Re: How to: Change Color/Style of the iPhone Status Bar
Hi seanhelmes,
To change the style of your status bar to BlackOpaque you need to add the following line into your applicationDidFinishLaunching method:
Code:
[application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
Hope that helps
06-26-2008, 03:42 AM
#3 (permalink )
Sean
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
Re: How to: Change Color/Style of the iPhone Status Bar
in what file of my Xcode project will I find the applicationDidFinishLaunching method: ? Thanks for the help!
06-26-2008, 03:46 AM
#4 (permalink )
Sean
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
Re: How to: Change Color/Style of the iPhone Status Bar
I figured it out....It goes in the AppDelegate.m file within the xcode project. Thanks for all of your help!
06-26-2008, 06:19 AM
#5 (permalink )
New Member
Join Date: Jun 2008
Location: North Yorkshire, UK
Age: 27
Posts: 75
Re: How to: Change Color/Style of the iPhone Status Bar
No problem seanhelmes,
Good luck with your app
09-20-2008, 04:52 PM
#6 (permalink )
New Member
Join Date: Sep 2008
Posts: 1
Set the title bar color in the Info.plist
Add a key value pair to the project Info.plist
Key = UIStatusBarStyle
Value = UIStatusBarStyleOpaqueBlack
If you make the change in the AppDelegate, you get a momentary grey bar that becomes black. This way it starts out black and no flicker.
Enjoy!
01-04-2010, 04:18 PM
#7 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 4
I have got one problem with this:
I want to change the style in a IBAction, but there "application" is unknown. How can I get the statusbar change outside of the applicationDidFinishLaunching?
01-04-2010, 06:03 PM
#8 (permalink )
at this moment
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Quote:
Originally Posted by
Murd
I have got one problem with this:
I want to change the style in a IBAction, but there "application" is unknown. How can I get the statusbar change outside of the applicationDidFinishLaunching?
In your IBAction method do:
UIApplication *application = [UIApplication sharedApplication];
Then you can refer to application just as you did in the didFinishLaunching method.
01-05-2010, 05:54 PM
#9 (permalink )
Tutorial Author
Join Date: Oct 2008
Location: Ontario, Canada
Posts: 466
Quote:
Originally Posted by
demonlord201
<snipped>
No, we don't. Your site is ****, along with your advertising.
Last edited by Kalimba; 01-05-2010 at 05:55 PM .
Reason: Snipped quoted post
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Online Users: 910
24 members and 886 guests
AragornSG , chits12345 , ilmman , iphone.savvy , jaffeling , JuliaHarris , leticiatroutman , luigi1977 , MarkC , Morrisone , mystic.purple , Nicoloren , nidie , OstinGames2011 , paverlight , premkumarmsc1 , prerna chavan , rocotilos , rodgo , RoryHarvey , slk_at , Thompson22 , watermelonvodka , Zuningo
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,481
Threads: 89,092
Posts: 380,127
Top Poster: BrianSlick (7,091)
Welcome to our newest member, paverlight