在viewDidLoad函数里写上
//自定义导航栏颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:50/255.0 green:147/255.0 blue:209/255.0 alpha:1]];
//自定义导航栏背景图片
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_banner10.png"] forBarMetrics:UIBarMetricsDefault];
//修改导航栏标题字体大小和颜色
[self.navigationController.navigationBar setTitleTextAttributes:@{
NSFontAttributeName:[UIFont systemFontOfSize:19],
NSForegroundColorAttributeName:[UIColor whiteColor]
}];
网友评论