iOS 修改状态栏字体颜色

2017-03-23  本文已影响83人  AnderQZ

UIStatusBarStyleLightContent //白色文字
UIStatusBarStyleDefault //默认黑色
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;}
出来后:

-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;}
上一篇下一篇

猜你喜欢

热点阅读