0

我已在下面設定在我viewDidLoad中:UINavigationBar的阿爾法除去

self.navigationController.tabBarController.tabBar.tintColor = tintColor; 
self.navigationController.tabBarController.tabBar.alpha = 0.7f; 

我已設置alpha所以在我的視圖的背景圖像滲出通過(給予UINavigationBar的更深的顏色)

然而,當在iOS7中,代碼在應用程序啓動時工作正常,但是當我離開視圖並返回Alpha設置後(我只剩下色調)時。

它在iOS6上的模擬工作正常,但不是在iOS7中,這可能是由於iOS7新UINavigationBar功能的設置衝突?

回答

0

你可能想嘗試這樣的:

[[UITabBar appearance] setTintColor:[UIColor redColor]]; 
[[UITabBar appearance] setBarTintColor:[UIColor yellowColor]]; 

那應該改變的TabBar的色調顏色的iOS 7

而且,這裏是如何munuplate的一個詳細的教程鏈接tabbar顏色也提供了一些源代碼。

https://www.captechconsulting.com/blog/steven-beyers/ios-7-tutorial-series-tint-color-and-easy-app-theming

+0

我剛開始走這條路線,它似乎是我所期待的,我最初的問題是我試圖創建一個iOS 6的(外觀)應用程序。我已經嘗試過,現在更新到iOS 7 – MrChrisBarker