Navigation Bar Color

385 views
Skip to first unread message

Howard Nager

unread,
Aug 16, 2008, 11:46:32 AM8/16/08
to iphonesdkd...@googlegroups.com
I've seen applications out there which use different color schemes for the navigation bar. Yelp uses red, some are Black, transparent, etc. How is that accomplished...I can't find a way in interface builder. Any help is appreciated - thanks!

iphonea...@gmail.com

unread,
Aug 17, 2008, 12:30:31 AM8/17/08
to iPhone SDK Development
Hello Howard,

Try this

1. Open IB, select Navigation Controller and click on Tools ->
Inspector.
2. In the TopBar, you can set an option from the list.

You can do the same using code

self.navigationController.navigationBar.barStyle =
UIBarStyleBlackOpaque;

possible options are UIBarStyleBlackTranslucent,
UIBarStyleBlackOpaque, UIBarStyleDefault

You can also set the tint color (background color) this way

self.navigationController.navigationBar.tintColor = [UIColor
redColor];

Thanks,
iPhone SDK Articles
http://www.iPhoneSDKArticles.com

Primozr

unread,
Aug 16, 2008, 12:26:51 PM8/16/08
to iPhone SDK Development
There is a tintColor property on UINavigationBar class... set this to
let's say [UIColor grayColor] and it will change color.
If you're using Interface Builder for laying out your views you can
choose color from inspector window in attributes section.
Reply all
Reply to author
Forward
0 new messages