我试图改变标题颜色,但它没有效果。如何更改导航栏标题颜色?
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? –