I'm currently building an iPhone app where the root controller is a Tab Bar and the secondary controller is a Navigation Bar. There are several apps that have an image/logo on top of the Navigation Bar, but I can't seem to be able to do this. I also can't find any documentation on how to do this. I have made several attempts, my latest being:
This didn't work. Does anyone know how to place a screen-width image between the Status bar and the Navigation Bar? If you have links to tutorials, I would appreciate it!
I'm currently building an iPhone app where the root controller is a Tab Bar and the secondary controller is a Navigation Bar. There are several apps that have an image/logo on top of the Navigation Bar, but I can't seem to be able to do this. I also can't find any documentation on how to do this. I have made several attempts, my latest being:
This didn't work. Does anyone know how to place a screen-width image between the Status bar and the Navigation Bar? If you have links to tutorials, I would appreciate it!
Thank you!!
Did you ever find a solution to this? I am also in the same boat.
I haven't tried this, but you can hide the navigation bar that comes with a navigation controller. Then you layout a view in IB and place a navigation bar (just a bar, not a controller) anywhere you want. You'd probably have to create an outlet for the navigation bar, because you'll have to cover some of the functions yourself (back button item, title, etc), but it may not be too bad. Worth trying, at any rate.
I haven't tried this, but you can hide the navigation bar that comes with a navigation controller. Then you layout a view in IB and place a navigation bar (just a bar, not a controller) anywhere you want. You'd probably have to create an outlet for the navigation bar, because you'll have to cover some of the functions yourself (back button item, title, etc), but it may not be too bad. Worth trying, at any rate.
The way to do this is on Apples iPhone Developer Center under the source of NavBar.
Thanks
megatron
If you are going to bump a month-old thread, at least take the time to read the question that was asked, and make your answer relate to that. The OP is clearly asking how to put an image above the nav bar (note the title of the thread and the clear description of the desired location for the image). Your answer puts an image in the nav bar, and thus does not apply.
I'm currently building an iPhone app where the root controller is a Tab Bar and the secondary controller is a Navigation Bar. There are several apps that have an image/logo on top of the Navigation Bar, but I can't seem to be able to do this. I also can't find any documentation on how to do this. I have made several attempts, my latest being:
This didn't work. Does anyone know how to place a screen-width image between the Status bar and the Navigation Bar? If you have links to tutorials, I would appreciate it!
If the previously-mentioned option is not sufficient, then add the image view directly to the window, and change the frame of the navigation controller accordingly.
If the previously-mentioned option is not sufficient, then add the image view directly to the window, and change the frame of the navigation controller accordingly.
Thanks for the quick reply.
I tried a similar suggestion posted on another thread. It is working. Here's code I added.
Here's an example of how Myspace uses the banner above Nav Controller:
Last edited by gammapoint; 06-03-2010 at 05:35 PM.