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
aSecondViewController.onlytest()

 

iOS, Xcode, Swift, TabBarController