Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-25-2008, 04:24 PM   #1 (permalink)
Sean
 
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
Default 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!
__________________
Check out Famebooth for iPhone, iPod touch & iPad at http://itunes.apple.com/us/app/fameb...412324686?mt=8
seanhelmes is offline   Reply With Quote
Old 06-25-2008, 04:53 PM   #2 (permalink)
New Member
 
Join Date: Jun 2008
Location: North Yorkshire, UK
Age: 27
Posts: 75
Default 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
CaptainRedmuff is offline   Reply With Quote
Old 06-26-2008, 03:42 AM   #3 (permalink)
Sean
 
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
Default 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!
__________________
Check out Famebooth for iPhone, iPod touch & iPad at http://itunes.apple.com/us/app/fameb...412324686?mt=8
seanhelmes is offline   Reply With Quote
Old 06-26-2008, 03:46 AM   #4 (permalink)
Sean
 
Join Date: Jun 2008
Location: Connecticut, USA
Age: 26
Posts: 40
Default 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!
__________________
Check out Famebooth for iPhone, iPod touch & iPad at http://itunes.apple.com/us/app/fameb...412324686?mt=8
seanhelmes is offline   Reply With Quote
Old 06-26-2008, 06:19 AM   #5 (permalink)
New Member
 
Join Date: Jun 2008
Location: North Yorkshire, UK
Age: 27
Posts: 75
Default Re: How to: Change Color/Style of the iPhone Status Bar

No problem seanhelmes,

Good luck with your app
CaptainRedmuff is offline   Reply With Quote
Old 09-20-2008, 04:52 PM   #6 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 1
Default 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!
rptally is offline   Reply With Quote
Old 01-04-2010, 04:18 PM   #7 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 4
Default

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?
Murd is offline   Reply With Quote
Old 01-04-2010, 06:03 PM   #8 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Default

Quote:
Originally Posted by Murd View Post
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.
jsd is offline   Reply With Quote
Old 01-05-2010, 05:54 PM   #9 (permalink)
Tutorial Author
 
Steaps's Avatar
 
Join Date: Oct 2008
Location: Ontario, Canada
Posts: 466
Default

Quote:
Originally Posted by demonlord201 View Post
<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
Steaps is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UILabel background color mademo iPhone SDK Development 3 02-10-2010 10:04 AM
UIBarButton style buttons outside of a toolbar jonc iPhone SDK Development 5 07-05-2009 12:47 AM
Can't change the color of the status bar mkroll iPhone SDK Development 2 08-06-2008 03:21 PM
Group Style Editing brianr iPhone SDK Development 2 06-29-2008 02:48 PM
Status Bar Not Hiding RegularKid iPhone SDK Development 3 06-25-2008 12:05 AM


» Advertisements
» Stats
Members: 158,481
Threads: 89,092
Posts: 380,127
Top Poster: BrianSlick (7,091)
Welcome to our newest member, paverlight
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:41 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0