I highlighted the UITabBarItem with the title (initWithTitle) and connected it to the UINavigationController.
I found out that if the root controller of the navigation controller has its own title, then this title will forever replace the title specified in the tab bar item. For example, if the title of the tab element is ONE and the title of the controller of the root controller of the navigation device is set to TWO, the tab bar item always shows TWO, not ONE. The only way to display an ONE tab bar item is to omit the title bar of the navigation controller controller altogether.
The fact is, I want to have different headers for each, because the tab bar item does not always lead to the controller of the root controller of the navigation controller - it shows the last view controller that was pressed on the navigation controller, which means that the root title in the tab bar can to be inappropriate. On the other hand, I cannot just throw away the title in the navigation controller because it is used in the navigation bar. Type of catch 22.
Is there any way around this?
source
share