2014-11-09 95 views
0

如何更改navbar占位符文本颜色?这些消息还有淡蓝色吗?导航栏酒吧外观

[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init]  forBarMetrics:UIBarMetricsDefault]; 
[[UINavigationBar appearance] setBackgroundColor:[UIColor redColor]]; 
+0

可能重复的[iPhone导航栏标题文字颜色](http://stackoverflow.com/questions/599405/iphone-navigation-bar-title-text-color) – 2014-11-09 04:37:29

回答

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"; 

}