在我的視圖控制器來設置我的欄按鈕項類似這樣的設置欄按鈕項目顏色在應用程序委託
[self.navigationItem.backBarButtonItem setTintColor:[UIColor whiteColor]];
但我想達到的目標是將其設置在我的應用程序委託,這樣我所有的酒吧在所有視圖控制器按鈕項目是白色的類似於這樣
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
我可以得到它的工作文字的東西,但我想改變它的圖像
樣本圖片,
編輯: 我怎麼設置我的圖像
試試這個 '[外觀的UIBarButtonItem] setTitleTextAttributes:[NSForegroundColorAttributeName:[的UIColor whiteColor] forState:UIControlStateNormal' –
@ New16它適用於文本,但不工作在圖像上。你有解決方案來設置圖像上的色調顏色? –
請參閱此文章https://www.appcoda.com/customize-navigation-bar-back-butto/。在這篇文章中,他們提到如何改變色調並在應用程序委託中自定義導航欄。 @Lian van der Vyver – KAR