self.title 设置的值会同时覆盖self.navigat
2020-10-22 本文已影响0人
汗青fullstack
UINavBar、UITabBar下的self.title,self.navigationItem.title, 会默认被self.title的值覆盖
SO:
1.UINavBar、UITabBar 显示相同的“标题”
在UIViewControler中设置:
self.title = @"标题";
1.UINavBar显示“标题”、UITabBar 显示的“菜单”
在UIViewControler中设置:
不要设置self.title,
self.navigationItem.title = @"标题";
self.tabbarItem.title = @"菜单"; //或者在其他地方单独设置tabbarItem也可以