views:

62

answers:

2

Hi, I have a couple of views in my iPhone app. each view shows a "top bar" in blue, I haven't added a "Navigation Bar", simply edited what's on the inspector "View Controller" section and gave it a title. (this section: http://img69.imageshack.us/i/schermata20101001a22014.png/)

Is it possible to change the color of this bar that'a automatically added on top of other View Items? or even to hide it? both In Interface Builder or in Code, thanks.

A: 

I'm not sure how to change the one added automatically, I assume that you'll have to make your own to change things such as the color, which you can do easily with the tint option in the attributes panel.

XenElement
yeah, I mor or less know how to change a "custom" navigation bar...but I would like to change the "automatic" one... thx anyway
Antonio
A: 

It's the navigation bar from the UINavigationController. You can do stuff like [self.navigationController setNavigationBarHidden:YES animated:YES] and self.navigationController.navigationBar.tintColor = [UIColor magentaColor].

You should not set the navigationBar.hidden/alpha directly, since those are handled by the UINavigationController. Additionally, UINavigationController may not re-layout your views appropriately.

tc.