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

BNicholson

macrumors newbie
Original poster
Apr 7, 2008
14
0
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
 

BNicholson

macrumors newbie
Original poster
Apr 7, 2008
14
0
Try calling the display method.

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
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Sorry for being unclear :eek:.

UINavigationItem doesn't inherit from NSView, but UINavigationBar does so try calling display on that...
 

BNicholson

macrumors newbie
Original poster
Apr 7, 2008
14
0
Sorry for being unclear :eek:.

UINavigationItem doesn't inherit from NSView, but UINavigationBar does so try calling display on that...

Thank you very much Eraserhead, that worked perfectly! =) I really appreciate the help.

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