Open phuongvnc opened 8 years ago
let nav1 = UINavigationController() let homeVC = HomeVC(nibName: "HomeVC", bundle: nil) nav1.viewControllers = [homeVC] nav1.title = "HOME" nav1.tabBarItem.image = UIImage(named: "Home_2")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) //navi favorite let nav2 = UINavigationController() let favoriteVC = FovariteVC(nibName: "FovariteVC", bundle: nil) nav2.viewControllers = [favoriteVC] nav2.title = "FOVARITE" nav2.tabBarItem.image = UIImage(named: "Star-30")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) //navi map let nav3 = UINavigationController() let mapVC = MapVC(nibName: "MapVC", bundle: nil) nav3.viewControllers = [mapVC] nav3.title = "MAP" nav3.tabBarItem.image = UIImage(named: "map30")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) //navi setting let nav4 = UINavigationController() let settingVC = SettingVC(nibName: "SettingVC", bundle: nil) nav4.viewControllers = [settingVC] nav4.title = "SETTING" nav4.tabBarItem.image = UIImage(named: "Settings-30")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) tabbar = UITabBarController() tabbar!.viewControllers = [nav1, nav2, nav3, nav4] tabbar!.tabBar.barTintColor = uicolorFromHex(16729344) tabbar!.tabBar.tintColor = uicolorFromHex(16729344)
nav1, nav2, nav3, nav4 -> homeVC, favoriteVC, mapVC, settingVC
uhm chinh lai roi ph
nav1, nav2, nav3, nav4 -> homeVC, favoriteVC, mapVC, settingVC