写在『UnityViewControllerBase+iOS.MM 』
{
static bool _PrefersStatusBarHidden = true;
static bool _PrefersStatusBarHiddenInited = false;
if (!_PrefersStatusBarHiddenInited)
{
NSNumber* hidden = [[[NSBundle mainBundle] infoDictionary] objectForKey: @"UIStatusBarHidden"];
_PrefersStatusBarHidden = hidden ? [hidden boolValue] : YES;
_PrefersStatusBarHiddenInited = true;
}
CGSize result = [[UIScreen mainScreen] bounds].size;
if(result.width / result.height >= 0.56)
{
_PrefersStatusBarHidden = true;
}
else
_PrefersStatusBarHidden = false;
return _PrefersStatusBarHidden;
}