Passing data between tab viewed controllers in swift?

If you need to pass the data between view controllers then :

var secondTab = self.tabBarController?.viewControllers[1] as SecondViewController
secondTab.array = firstArray 

Leave a Comment