Navigation Bar not getting displayed

Discussion in 'iOS Programming' started by McBgnr, Aug 17, 2009.

  1. McBgnr macrumors regular

    Joined:
    Apr 13, 2009
    #1
    I am trying to add Black Navigation bar from the Attributes Inspector to my View, but it is not getting getting displayed at runtime. What else do I have to do for using the Navigation Bar on the view?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Is this in the "Simulated Interface Elements" section that you added it? If so, that doesn't actually add it; it's just, um..., simulated. :)
     
  3. McBgnr thread starter macrumors regular

    Joined:
    Apr 13, 2009
    #3
    Oh yes... it is in the simulated interface elements section. So it will not show up. What is the correct way of adding it then?
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    UINavigationController?

    The simulated stuff is just to let you see how the view will look with the navigaion/tab controller bits showing...
     
  5. McBgnr thread starter macrumors regular

    Joined:
    Apr 13, 2009
    #5
    I added UINavigationViewController to the main xib and added outlet in the AppDelegate.

    However, my current view is a full screen view, and I am displaying my view using the call:
    Code:
    [window addSubview:myViewcontroller.view];
    
    How can I now get the navigationbar displayed on top of myView?
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #6
    If you build the navbar template project it does exactly this. Start with that template.
     

Share This Page