UINavigationItem redrawing problem

Discussion in 'Mac Programming' started by BNicholson, Jun 17, 2008.

  1. macrumors newbie

    Joined:
    Apr 7, 2008
    #1
    Hey guys, I have been fighting with my UIViewController's navigationItem to get it to redraw the title after I have hidden the back button. In previous beta's(I think 5 was the last one) when I called this:

    Code:
    [self.navigationItem setHidesBackButton:YES animated:YES];
    the title automatically adjusted itself to be center since there was no longer a back button taking up space on the title bar. I was wondering if anyone had come across this issue or if anyone knows of a way to get the title to center itself after I hide the back button.

    -Brent
     
  2. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
  3. thread starter macrumors newbie

    Joined:
    Apr 7, 2008
    #3
    Could you be a little more specific? I have tried calling "setNeedsDisplay" on the entire view, and that didn't work. Because a UINavigationItem doesn't have a "display" method.

    -Brent
     
  4. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    Sorry for being unclear :eek:.

    UINavigationItem doesn't inherit from NSView, but UINavigationBar does so try calling display on that...
     
  5. thread starter macrumors newbie

    Joined:
    Apr 7, 2008
    #5
    Thank you very much Eraserhead, that worked perfectly! =) I really appreciate the help.

    -Brent
     

Share This Page