14
我已經創建了tabBarController以編程方式,我想更改顏色的圖像色彩顏色(不是酒吧)該選項卡包含。誰能告訴我如何在Swift中做到這一點?Swift:更改標籤欄的圖像色調?
我已經創建了tabBarController以編程方式,我想更改顏色的圖像色彩顏色(不是酒吧)該選項卡包含。誰能告訴我如何在Swift中做到這一點?Swift:更改標籤欄的圖像色調?
在您的 '應用中:didFinishLaunchingWithOptions'
(window?.rootViewController as! UITabBarController).tabBar.tintColor = UIColor.redColor()
或使用的外觀委託。
UITabBar.appearance().tintColor = UIColor.redColor()
而不是.tintColor = ...嘗試使用.barTintColor = – stosha
.barTintColor將更改背景... –