I am using a class which extends UITabBarController
. I need to set the self.tabBarController.selectedIndex
property of my class in order to switch tabs.
Since I want to set this variable/call a method that changes this variable from another class I must have an instance of my custom class which is called TabsController
So far I have looked at these two posts but they involve using the storyboard and I am doing almost everything programmatically, infact this is my entire storyboard:
How do I programmatically solve this problem?
Get Instance Of ViewController From AppDelegate In Swift
Access the instance of a Viewcontroller from another in swift