TabBarController: 调试

改 let arrayNames = ,
便于调试。

func createViewControllers(){
     
let arrayNames = ["FairViewController","FindViewController","ChefViewController","HomePageViewController","ProfileViewController"]
   
       
//        let arrayNames = ["HomePageViewController","FindViewController","ChefViewController","FairViewController","ProfileViewController"]
       
       let names = ["首页","发现","主厨","市集","我"]
       
   
       
       var array = Array<UINavigationController>()
       
       
       for i in 0..<arrayNames.count{
       
           let controllerName = "deliciousOfCource." + arrayNames[i]
           
           let viewControllerClass = NSClassFromString(controllerName) as! UIViewController.Type
           
           let viewController = viewControllerClass.init()
           viewController.tabBarItem.title = names[i]
           viewController.tabBarItem.image = UIImage(named: "item_app_home")
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容