In Object-C I store Class objects in an array and init them dynamically like this: self.controllers=@[[OneViewController class],[TwoViewController class]]; Class clz = self.controllers[index]; UIViewController *detailViewController = [[clz alloc] init]; In Swift i try this way but it raises an error: var controllers:AnyClass[] = [OneViewController.self,TwoViewController.self] var clz : AnyClass =