1
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
var nav1 = UINavigationController()
var first = ViewController(nibName: nil, bundle: nil)
nav1.viewControllers = [first]
var second = ccDiscovery(nibName: nil, bundle: nil)
var nav2 = UINavigationController()
nav2.viewControllers = [second]
var third = ccPosting(nibName: nil, bundle: nil)
var nav3 = UINavigationController()
nav3.viewControllers = [third]
var fourth = ccProfile(nibName: nil, bundle: nil)
var nav4 = UINavigationController()
nav4.viewControllers = [fourth]
var tabs = UITabBarController()
tabs.viewControllers = [nav1, nav2,nav3,nav4]
self.window!.rootViewController = tabs;
self.window?.makeKeyAndVisible();
如何將圖標圖像和圖像背景添加到App委託中的UItabBar我找不到任何。Swift:如何將圖標圖像和圖像背景添加到App委託中的UItabBar?
預先感謝您。
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.magentaColor()], forState:.Normal)
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.redColor()], forState:.Selected)
謝謝你提前。
謝謝加文Bunney。 – 2015-03-03 14:26:19