2014-11-09 87 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"; 

}