改变状态栏颜色
iOS手机状态栏默认是黑色,在某些情况下需要改变状态栏的颜色
在info.plist文件中添加:View controller-based status bar appearance:NO
info.png
隐藏状态栏
//隐藏状态栏
if([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]){
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
-(BOOL)prefersStatusBarHidden{
return YES;
}
end
网友评论