导航控制器-自定义导航栏
设置颜色用settintcolor
也可以直接设置背景图片。
UIImage *image = [UIImage imageNamed:@"title"];
[self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
但是在5.0之前是不能直接设置背景图片。需要定义一个分类,重写drawrect方法
分类函数的执行优先级更高
调用方法时候进行版本判断