首先,我们要在plist文件里添加 View controller-based status bar appearance == NO 默认是YES。
然后你写更改状态栏颜色的方法就有效果了
UIStatusBarStyleLightContent为你要设置的颜色
[[UIapplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
一共有四种情况
UIStatusBarStyleDefault = 0, // Dark content, for use on light backgrounds
UIStatusBarStyleLightContent NS_ENUM_AVAILABLE_IOS(7_0) =1, // Light content, for use on dark backgrounds
UIStatusBarStyleBlackTranslucent NS_ENUM_DEPRECATED_IOS(2_0,7_0, "Use UIStatusBarStyleLightContent") =1,
UIStatusBarStyleBlackOpaque NS_ENUM_DEPRECATED_IOS(2_0,7_0, "Use UIStatusBarStyleLightContent") =2,
通过这些就可以更改你的状态栏的颜色新闻热点
疑难解答