我試圖改變標題顏色,但它沒有效果。如何更改導航欄標題顏色?
NSDictionary *navbarTitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, nil];
[[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
也許導航欄風格是黑色的問題?
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
試試這個http://stackoverflow.com/a/621185/7250862 –
你檢查了我的updat ed ans? –