1、首先要设置statusBar的字体颜色要先到plist文件里面加上几个参数
View controller-based status bar appearance bools YES/NO(必填,设置为NO,才可以操作电量条,默认YES)
Status bar is initially hidden bools YES/NO(YES隐藏)
Status bar style UIStatusBarStyleLightContent(白色)UIStatusBarStyleDefault(黑色)
2、AppDelegate编写代码
//改变电池栏颜色(需先设置info.plist相关属性)(全局)
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;