I am developing an app wherein a user action should lead to the reduction of TabController options (icons) from 5 down to 3.
I understand the code required to modify the TabController but am unable to force it to refresh (viewDidLoad) since the ViewController where the user interacts is several steps downstream from the tab controller (the flow aslo includes a NavController). As a result
self.tabBarController?.viewDidLoad()
does not seem to work.
Here is my code:
print("pressed tab refresh")
print(self.tabBarController)
//this next line confirms that I can "see" the tab controller in question
print(self.tabBarController?.title)
//expect this to work
self.tabBarController?.viewDidLoad()
//trying this as well
var setTBC = self.tabBarController
setTBC?.delegate = self
setTBC?.viewDidLoad()