How do I access viewControllers in UITabbarController in swift?
I'm trying to get a second viewbarcontroller so I can popToRoot, but Swift tells me that using Int index as index is invalid and I have to use AnyObject as index
var controller = self.viewControllers[2] as! UIViewController
error: "Unable to tune value of type [AnyObject]? with Int"
+3
source to share