navigationBar设置背景颜色现阶段我有四种方法
方法1、
UIImage *topImage = [UIImage imageNamed:@"Navigation-Bar_backgroud_44@2x"];
[[UINavigationBar appearance] setBackgroundImage:topImage forBarMetrics:UIBarMetricsDefault];
方法二
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
方法三
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
方法四
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 320, 44)];
[self.navigationItem setTitleView:label];