I have array of strings
var arr = ["firstViewController", "secondViewController", ....]
For each of it's items I need to instantiate ViewController like
var myVC = self.storyboard?.instantiateViewController(withIdentifier: "firstViewController") as! firstViewController
If i want to instantiate View Controllers from loop I need to make class from string but this code
let namespace = Bundle.main.infoDictionary!["CFBundleExecutable"] as! String
let cls: AnyClass = NSClassFromString("\(namespace).\(className)")!
Is not working