Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jorgmart

macrumors newbie
Original poster
Feb 25, 2009
7
0
Hello,

Im new in Iphone developing, my english is not very good, excuse me in advance.

Im trying to create a interface using a UINavigationController with 2 UIViewControllers. The root controller must have a custom image covering the whole area of the navigation bar, but when the 2nd controller is pushed, the classical navigation bar is displayed. Something like is shown in the "USA Today" app.

I've tried with the titleView property of the "navigationItem" but this is not an option because it not cover the whole area of the navigation bar ... just the title, and some gaps left unfilled.

My current option is to do all the navigation by myself. This is, to create my first view with my banner then show my second view with an animation. Of course I need to manage all the stuff regarding pushing and poping views.

Is there an easy way to achieve this?

Thanks in advance.

Jorge
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
Rather than trying to redo all the smarts of the UINavigationController, I'd suggest subclassing it and then overriding it as necessary to show your custom image background. This is one of the advantages of object-oriented programming and you should take advantage of it when you can.

P.S. Your English is very good!
 

jorgmart

macrumors newbie
Original poster
Feb 25, 2009
7
0
Thank you dejo,

Subclassing Navigation Controller? I will try that ...

Regards!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.