状态栏背景修改

typedef NS_ENUM(NSInteger, UIStatusBarStyle) {
UIStatusBarStyleDefault                                     = 0, // Dark content, for use on light backgrounds
UIStatusBarStyleLightContent     NS_ENUM_AVAILABLE_IOS(7_0) = 1, // Light content, for use on dark backgroundsUIStatusBarStyleBlackTranslucent NS_ENUM_DEPRECATED_IOS(2_0, 7_0, “Use UIStatusBarStyleLightContent”) = 1,
UIStatusBarStyleBlackOpaque      NS_ENUM_DEPRECATED_IOS(2_0, 7_0, “Use UIStatusBarStyleLightContent”) = 2,

} __TVOS_PROHIBITED;
– (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[MobClick beginLogPageView:@”industrySelectVC”];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
}
//默认颜色黑色
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
//默认颜色白色
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
分享到: 更多
Separator image Posted in IOS.