转自:http://www.2cto.com/kf/201407/316311.html
如有侵犯,请来信oiken@qq.com
设置导航栏的背景色
self.navigationController.navigationBar.barStyle = UIStatusBarStyleDefault;
self.navigationController.navigationBar setTranslucent:NO];//否则和下方的viewDate的颜色不一致,因为有渐变
self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:62/255.0 green:68/255.0 blue:81/255.0 alpha:1]];
去掉导航栏的边界黑线
in viewDidload:
1
2
|
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
|
去掉搜索框的边界黑线
in viewDidload:
1
|
[self.textSearchBar setBackgroundImage:[[UIImage alloc] init]];
|
去掉搜索框的文本输入框的阴影
in stroryboard:
选中搜索框——右边in attribute inspector——View 在Tint的颜色栏中选择 clear color