Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UINavigationItem titleView "ignored if leftBarButtonItem is set"?

The documentation for UINavigationItem's titleView property says:

"This property is ignored if leftBarButtonItem is not nil."

However, I've set both the titleView and leftBarButtonItem properties in my testing and they both appear to show up fine. I've tested on all the simulators in my Xcode: 4.3, 5.0, and 5.1. Does anyone know if the documentation is just wrong, or is it correct on some older versions (e.g. 4.2, 3.x) that I haven't been able to test?

like image 387
user102008 Avatar asked Mar 13 '12 19:03

user102008


2 Answers

Check the documentation for property leftBarButtonItems, it says:

If there is not enough room to display all of the items in the array, those that would overlap the title view (if present) or the buttons on the right side of the bar are not displayed.

So, what's said for titleView is probably incorrect.

like image 177
indisoluble Avatar answered Nov 04 '22 11:11

indisoluble


I think the documentation is wrong, and you should file a bug report.

like image 37
fzwo Avatar answered Nov 04 '22 11:11

fzwo