iOS 设置状态栏的背景颜色方法

设置状态栏的背景颜色

- (void)setStatusBarBackgroundColor:(UIColor *)color

{

    UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];

  if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {

    statusBar.backgroundColor = color;

  }

}

以上这篇iOS 设置状态栏的背景颜色方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

你可能感兴趣的:(iOS 设置状态栏的背景颜色方法)