navigationitem

iPhone Navigation Bar Title text color

本小妞迷上赌 提交于 2019-11-26 01:48:15
问题 It seems the iOS Navigation Bar title color is white by default. Is there a way to change it to a different color? I am aware of the navigationItem.titleView approach using an image. Since my design skills are limited and I failed to get the standard glossy, I prefer changing the text color. Any insight would be much appreciated. 回答1: Modern approach The modern way, for the entire navigation controller… do this once, when your navigation controller's root view is loaded. [self

iPhone Navigation Bar Title text color

被刻印的时光 ゝ 提交于 2019-11-25 23:12:40
It seems the iOS Navigation Bar title color is white by default. Is there a way to change it to a different color? I am aware of the navigationItem.titleView approach using an image. Since my design skills are limited and I failed to get the standard glossy, I prefer changing the text color. Any insight would be much appreciated. Modern approach The modern way, for the entire navigation controller… do this once, when your navigation controller's root view is loaded. [self.navigationController.navigationBar setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor yellowColor]}];