修改UINavigationController返回按钮颜色

系统默认颜色是蓝色的 视觉效果非常难看

在push进的ViewController中写

//修改UINavigationController的文字颜色
self.navigationController.navigationBar.tintColor=[UIColor whiteColor];
//修改UINavigationController的前景颜色
self.navigationController.navigationBar.barTintColor=[UIColor colorWithRed:212/256.0 green:21/256.0 blue:10/256.0 alpha:1];
//修改UINavigationController的titleView的文字 字体 文字颜色
UILabel* title=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 160, 44)];
title.backgroundColor=[UIColor clearColor];
title.text=@"发现音乐";
title.textAlignment=1;
title.font=[UIFont systemFontOfSize:18 weight:1.0];
title.textColor=[UIColor whiteColor];
self.navigationItem.titleView=title;

 

posted @ 2015-12-02 13:35  death3721  阅读(507)  评论(0编辑  收藏  举报