如何更改导航栏占位符文字颜色?这些消息也有淡蓝色吗?
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundColor:[UIColor redColor]];
答案 0 :(得分:2)
认为这会奏效。
- (void)viewDidLoad
{
[super viewDidLoad];
//I am using UIColor BlueColor for an example but you can use whatever color you like
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blueColor]};
//change the title here to whatever you like
self.title = @"Home";
}