WkWebview横屏全屏播放当前,回到竖屏状态会导致状态栏异样。与这个问题相似:https://stackoverflow.com/que...
解决方案也是如此。写下oc的解决办法:
//横屏状态下暗藏状态栏,保障视频能够全屏播放- (BOOL)prefersStatusBarHidden { return UIApplication.sharedApplication.statusBarOrientation == UIInterfaceOrientationLandscapeLeft || UIApplication.sharedApplication.statusBarOrientation == UIInterfaceOrientationLandscapeRight;}
//放到viewDidLoad办法外面监听屏幕的变动[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDeviceOrientationDidChange) name:UIDeviceOrientationDidChangeNotification object:nil];
//刷新statusbar的暗藏状态,当屏幕地位发生变化的时候- (void)handleDeviceOrientationDidChange { [self setNeedsStatusBarAppearanceUpdate];}