改 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")