From 91c6812540764fef53ceee91c7f3a280db84cc79 Mon Sep 17 00:00:00 2001 From: changsanjiang Date: Wed, 2 Nov 2022 18:39:08 +0800 Subject: [PATCH] Release 3.7.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构亮度和音量控制器 --- .../Common/Implements/SJFitOnScreenManager.m | 6 ------ .../UIKit/UIViewController+SJBaseVideoPlayerExtended.m | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SJBaseVideoPlayer/Common/Implements/SJFitOnScreenManager.m b/SJBaseVideoPlayer/Common/Implements/SJFitOnScreenManager.m index 4f242f84..2846e6bf 100755 --- a/SJBaseVideoPlayer/Common/Implements/SJFitOnScreenManager.m +++ b/SJBaseVideoPlayer/Common/Implements/SJFitOnScreenManager.m @@ -144,12 +144,6 @@ - (void)setFitOnScreen:(BOOL)fitOnScreen animated:(BOOL)animated completionHandl if ( fitOnScreen ) { UIViewController *top = [self topMostController]; if ( !animated ) [self _presentedAnimationWithDuration:0 completionHandler:nil]; - if (@available(iOS 16.0, *)) { - - } else { - // 16以下的系统, 如果当前界面是横屏,fitOn后是竖屏问题 - self.viewController.modalPresentationStyle = UIModalPresentationFullScreen; - } [top presentViewController:self.viewController animated:animated completion:^{ if ( completionHandler ) completionHandler(self); }]; diff --git a/SJBaseVideoPlayer/Common/UIKit/UIViewController+SJBaseVideoPlayerExtended.m b/SJBaseVideoPlayer/Common/UIKit/UIViewController+SJBaseVideoPlayerExtended.m index 0a969f3e..61ad74b8 100644 --- a/SJBaseVideoPlayer/Common/UIKit/UIViewController+SJBaseVideoPlayerExtended.m +++ b/SJBaseVideoPlayer/Common/UIKit/UIViewController+SJBaseVideoPlayerExtended.m @@ -29,7 +29,13 @@ @implementation SJModalPresentationHandler - (void)setModalViewController:(nullable UIViewController *)modalViewController { _modalViewController = modalViewController; modalViewController.transitioningDelegate = self; - modalViewController.modalPresentationStyle = UIModalPresentationCustom; + if (@available(iOS 16.0, *)) { + modalViewController.modalPresentationStyle = UIModalPresentationCustom; + } else { + // https://github.com/changsanjiang/SJBaseVideoPlayer/pull/36 + // 16以下的系统, 如果当前界面是横屏,fitOn后是竖屏问题 + modalViewController.modalPresentationStyle = UIModalPresentationFullScreen; + } } - (NSTimeInterval)transitionDuration:(nullable id)transitionContext {