iOS 开发

设置UINavgationBar的背景色

2016-06-17  本文已影响189人  小码农_gjw

全局设置导航栏背景色:

// 设置状态栏颜色

[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;

// 设置全局UINavigationBar背景色

UINavigationBar*bar = [UINavigationBar  appearance];

CGFloat  rgb =0.1;

bar.barTintColor= [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:0.9];

bar.tintColor= [UIColor whiteColor];

bar.titleTextAttributes=@{NSForegroundColorAttributeName: [UIColor whiteColor]};

上一篇 下一篇

猜你喜欢

热点阅读