Possible Duplicate:
iPhone SDK – make UINavigationBar transparent
In my app I’m using a NavigationController that wraps all of the other views through Push Segues. So I’m wondering how I can go about setting the controller to have a clear background for all views.
I tried
[self.navigationController.navigationBar setBackgroundColor:[UIColor clearColor]];
but my view still loaded with the same stock color bar.
Anyone out there that can give me some help is greatly appreciated.
If you are referring to the navigation bar that comes with the viewControllers being a part of the navigationController’s array of viewControllers, then you cannot simply set it that way. If you want to have clear navigation bars, the best way to do it would be to use just viewControllers without the navigation controller and present the viewControllers with modal segues. How ever you will need to handle the navigation on your own, like going from one view controller to the previous, dismissing the viewController etc.
You could subclass the navigation bar and override the
drawrectmethod. I would personally avoid using[UIColor clearColor]as much as possible to avoid blended layers and to improve performance.