Image at Navigation bar

Discussion in 'iOS Programming' started by jorgmart, Mar 2, 2009.

  1. jorgmart macrumors newbie

    Feb 25, 2009

    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.

  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    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!
  3. jorgmart thread starter macrumors newbie

    Feb 25, 2009
    Thank you dejo,

    Subclassing Navigation Controller? I will try that ...


Share This Page