Skip to content

Commit

Permalink
Merge pull request #36 from hootigger/master
Browse files Browse the repository at this point in the history
#35 pr 规范处理
  • Loading branch information
changsanjiang committed Oct 25, 2022
2 parents f7f6283 + 494e555 commit 5c392f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SJBaseVideoPlayer/Common/Implements/SJFitOnScreenManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ - (void)setFitOnScreen:(BOOL)fitOnScreen animated:(BOOL)animated completionHandl
if ( fitOnScreen ) {
UIViewController *top = [self topMostController];
if ( !animated ) [self _presentedAnimationWithDuration:0 completionHandler:nil];
// 16以下的系统, 如果当前界面是横屏,fitOn后是竖屏问题
self.viewController.modalPresentationStyle = UIModalPresentationFullScreen;
if (@available(iOS 16.0, *)) {

} else {
// 16以下的系统, 如果当前界面是横屏,fitOn后是竖屏问题
self.viewController.modalPresentationStyle = UIModalPresentationFullScreen;
}
[top presentViewController:self.viewController animated:animated completion:^{
if ( completionHandler ) completionHandler(self);
}];
Expand Down

0 comments on commit 5c392f1

Please sign in to comment.