我的應用中的導航欄有白色文本,當用戶打開地址簿時,它應該是普通顏色(藍色文本)。我嘗試在推送地址簿視圖之前更改文本顏色,但標題(組,取消)仍爲白色。我怎麼解決這個問題?任何幫助表示讚賞。地址簿顏色已更改
編輯:中間的標題(所有聯繫人)就像默認的黑色。
我已經嘗試過
self.navigationController.navigationBar.tintColor = [UIColor blueColor];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
self.navigationItem.leftBarButtonItem.tintColor = [UIColor blueColor];
推動地址簿查看過,但沒有奏效。
我也試過
[picker.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor blueColor] forKey:NSForegroundColorAttributeName]];
picker.navigationController.navigationBar.tintColor = [UIColor blueColor];
picker.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor blueColor] forKey:NSForegroundColorAttributeName];
但這些沒有工作也沒有。
修正了
[[UIBarButtonItem appearance] setTintColor:nil];
問題也許這個帖子可能是有用的 http://stackoverflow.com/questions/599405/iphone-navigation-bar-title-text-color –
他們想要更改該帖子中的默認顏色,但我只想要默認顏色。 – user2414460