I have couple of questions. How to pass the data (which i got after the Alamofire request is finished), to one of children of TabBarController?
The first problem i have
You don't necessarily need to use prepareForSegue for this. Just reference which ViewController in the TabBarController viewControllers array that you want and cast it.
let vc = self.tabBarController.viewControllers![1] as! HomeViewController
vc.templateForCell = templates
If the ViewControllers in your TabBar are embedded in Navigation Controllers, you can do this:
let navController = self.tabBarController.viewControllers![1] as! UINavigationController
let vc = navController.topViewController as! HomeViewController
vc.templateForCell = templates