前端之家收集整理的这篇文章主要介绍了
swift软件模块划分方案,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
var storyA = UIStoryboard(name:"AStoryboard",bundle: nil)
var vcA = storyA.instantiateInitialViewController() as UIViewController
vcA.tabBarItem = UITabBarItem(title: "a",image: UIImage(named: "a_01.png"),selectedImage: UIImage(named: "b_01.png"))
var storyB = UIStoryboard(name:"BStoryboard",bundle: nil)
var vcB = storyB.instantiateInitialViewController() as UIViewController
vcB.tabBarItem = UITabBarItem(title: "b",image: UIImage(named: "a_02.png"),selectedImage: UIImage(named: "b_02.png"))
var storyC = UIStoryboard(name:"CStoryboard",bundle: nil)
var vcC = storyC.instantiateInitialViewController() as UIViewController
vcC.tabBarItem = UITabBarItem(title: "c",image: UIImage(named: "a_03.png"),selectedImage: UIImage(named: "b_03.png"))
var storyD = UIStoryboard(name:"DStoryboard",bundle: nil)
var vcD = storyD.instantiateInitialViewController() as UIViewController
vcD.tabBarItem = UITabBarItem(title: "d",image: UIImage(named: "a_04.png"),selectedImage: UIImage(named: "b_04.png"))
var TabBarVC: [AnyObject] = [vcA,vcB,vcC,vcD]
self.tabBar.tintColor = UIColor.purpleColor()
self.viewControllers = TabBarVC
原文链接:https://www.f2er.com/swift/327369.html