ZFPlayer icon indicating copy to clipboard operation
ZFPlayer copied to clipboard

iOS16以下系统windwos遮挡问题

Open lcyisgod opened this issue 1 year ago • 2 comments

在iOS16以下系统横屏情况下ZFLandscapeViewController_iOS15会遮挡系统windows

lcyisgod avatar May 18 '23 06:05 lcyisgod

方法一:在ZFPortraitControlView164行找到下面方法

  • (void)fullScreenButtonClickAction:(UIButton *)sender { if(ISLandscape){ //当前是横屏,手动调整屏幕全屏。(判断当前是横屏的方法自己百度) [self.player rotateToOrientation:UIInterfaceOrientationLandscapeRight animated:YES];//当前方向和旋转方向相反,否则没有响应 return; } [self.player enterFullScreen:YES animated:YES]; }

Mr-Dsg avatar May 27 '23 07:05 Mr-Dsg

方法二:找到ZFLandscapeRotationManager_iOS15.m第61行,添加一行代码:

  • (void)interfaceOrientation:(UIInterfaceOrientation)orientation completion:(void(^ __nullable)(void))completion { ... if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) { ... } [self.landscapeViewController viewWillTransitionToSize:self.landscapeViewController.view.frame.size withTransitionCoordinator:self.landscapeViewController.transitionCoordinator]; [UIViewController attemptRotationToDeviceOrientation]; }

Mr-Dsg avatar May 27 '23 10:05 Mr-Dsg