Closed lyc59621 closed 7 years ago
那我要怎么写 才不会影响item的title self.navigationItem.title 这样?? 不太好吧
这样写为什么不太好?
有没有方法可以让self.title 方法不影响 tabBarItem.title 这个方法
这是系统实现,暂时没有好的方法。
这样设置还是不能显示navi的title
为什么我改变成self.title和不该之前 self.navigationItem.title 都不显示呢
请检查 是否是将该设置放在了 viewDidLoad
方法中,建议放在 viewWillAppear
中, 详情参考 http://stackoverflow.com/a/10982774
这时候ViewController还没有push出来,对应navigation相关属性都是nil,你在这里设置是没用的,请等 ViewController push 出来后设置。
为什么不在ViewController push出来后再设置?出于什么考虑?
你po下navigationController属性
tabbar的item和这个不一样么,我想和tabbar一起设置,self.title
我在navigation下的根控制器设置了title就显示了
具体怎么做的,贴个代码出来吧。
应该就是在加载过程中,没有加载navi的时候已经加载了根控制器的viewdidload;了
iOS系统内部实现就是这么实现的。