Swift – Reach other Controller from a TabBarController

Just a small Swift code snippet, how to reach other Controllers from TabBarController.
First get all the view controllers. Then get a specific one.

var anArrayViewControllers = self.tabBarController!.viewControllers
var aSecondViewController: SecondViewController
aSecondViewController = anArrayViewControllers![1] as! SecondViewController


iOS, Xcode, Swift, TabBarController

Leave a Reply

Your email address will not be published. Required fields are marked *