一、 状态栏背景(黑色)的设置

1.在有导航栏的情况下,给导航栏设置一个像素为44的背景图片即可

[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"导航栏背景图片名"] forBarMetrics:UIBarMetricsDefault];

 

2.在没有导航栏的情况下,改变window的frame   

self.window.frame = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height - 20);

 

二、状态栏前景的设置

1.在Info.plist中增加Key:View controller-based status bar appearance  布尔值Value:NO

2.设置前景颜为白色

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

 

相关文章:

  • 2021-06-26
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案