2015-02-06 51 views
0

我知道這個話題有類似的答案,但我似乎無法得出任何結論。我正在使用IOS 8和在應用程序委託中創建的選項卡欄。有沒有辦法將選定的標籤欄項目設置爲某種顏色。最好不使用圖像。 id like to replicate this if possible設置選定的標籤欄項目色調?

回答

0
[[UITabBar appearance] setTintColor:[UIColor myBlueishColor]]; 
[[UITabBar appearance] setSelectedImageTintColor:[UIColor myBlueishColor]]; 

您可能會發現更多相關的信息在這裏: http://jslim.net/blog/2014/05/05/ios-customize-uitabbar-appearance/

+0

這不起作用 – 2016-05-10 22:16:11

+0

你實際的TabBar之前調用它顯示? 'didFiishLaunchingWithOptions'是個好地方。 – 2016-05-18 08:17:19

+0

試過viewDidLoad。如果didFinishLaunchingWithOptions是正確的地方,那麼用這些信息更新您的答案將使其更加清晰。 – 2016-05-18 09:15:29

相關問題