UINavigationItem titleView “ignored if leftBarButtonItem is set”?

前端 未结 5 580
情话喂你
情话喂你 2020-12-10 14:09

The documentation for UINavigationItem\'s titleView property says:

\"This property is ignored if leftBarButtonItem is not ni

5条回答
  •  自闭症患者
    2020-12-10 15:04

    I've run into this as well. In My specific problem both the titleview and leftbar item would appear. However If I had a Back Button then my titleview would disappear on Push and use the default title. If I have a custom uibuttonitem set for the left it works fine. So It seems to be related to back button. I ended up solving by setting title attributes and no doing a custom view.

提交回复
热议问题