I have a tab bar controller with 4 child view controller. Every time the user switches tab bar the navigation items at the top right are supposed to change. They do change, except for one scenario (user going from the third tab).
I must admit that I am changing the navigation items of the navigation bar of the tab bar controller. I am not using four different navigation controllers + view controllers.
// called in viewWillAppear
internal func setupNavigationBar() {
title = "Meeting"
if let tabBarVC = parent as? ProjectTabBarController {
tabBarVC.navigationItem.leftBarButtonItems = nil
tabBarVC.navigationItem.rightBarButtonItems = nil
tabBarVC.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(didTapCreateMeeting))
}
}