导航栏栏外观

时间:2014-11-09 04:25:20

标签: ios objective-c xcode

如何更改导航栏占位符文字颜色?这些消息也有淡蓝色吗?

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

1 个答案:

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

}