views:

363

answers:

2

Hello all what I would like to know is it even possible to change the Color of the top bar in this UITableView ( the nav + toolbar )(code wise).

http://sites.google.com/site/iphonesdktutorials/images/navtoolbar/App.jpg

Another question concerning the top bar , how do they manage to remove the backbutton like here item 1 is the one I want to remove code wise.

http://1.bp.blogspot.com/_ixq8Dp4ESMo/Sc-qrEQzclI/AAAAAAAAAG4/EOqFoiQU9uA/s1600-h/detailview.jpg

+1  A: 

This is not about the UITableView but, a navigation controller. There are many samples and guides out there on using table views in navigation controllers, including how to customize (e.g., the color of the top bar, or adding/removing/relabelling buttons).

One starting point is the apple website.

http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/UsingNavigationControllers/UsingNavigationControllers.html

rhess
+1  A: 

1) Pull up the Tools->Attribute Inspector for you UINavigationBar in interface builder. Adjusting the Style and Tint attributes, among others, is the way that I have created many of my navigation bars.

2) If you would rather not see the back button, you can simply use the built in hide mechanism (from UINavigationItem reference):

setHidesBackButton:animated: Sets whether the back button is hidden, optionally animating the transition.

-(void)setHidesBackButton:(BOOL)hidesBackButton animated:(BOOL)animated

Parameters: hidesBackButton YES if the back button is hidden when this navigation item is the top item; otherwise, NO.

animated YES to animate the transition; otherwise, NO.

It would look like this:

[theNavBarItem setHidesBackButton:YES animated:false];

What's handy is that this sets a BOOL property that should keep the back bar hidden.

TahoeWolverine
super thnx man... works good
If you found this to work, can you "up" the answer?
TahoeWolverine
+1 exactly what I was looking for.
Luther Baker