diff --git a/MediaBrowser.xcodeproj/project.pbxproj b/MediaBrowser.xcodeproj/project.pbxproj index 07b1669..0156737 100644 --- a/MediaBrowser.xcodeproj/project.pbxproj +++ b/MediaBrowser.xcodeproj/project.pbxproj @@ -488,7 +488,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -547,7 +547,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/MediaBrowser/MediaBrowser.swift b/MediaBrowser/MediaBrowser.swift index d51b104..1632d22 100755 --- a/MediaBrowser/MediaBrowser.swift +++ b/MediaBrowser/MediaBrowser.swift @@ -67,6 +67,7 @@ func floorcgf(x: CGFloat) -> CGFloat { } return $0 }(AVPlayerViewController()) + internal var currentVideoIndex = 0 internal var currentVideoLoadingIndicator: UIActivityIndicatorView? @@ -288,11 +289,8 @@ func floorcgf(x: CGFloat) -> CGFloat { isVCBasedStatusBarAppearance = true } - hidesBottomBarWhenPushed = true - automaticallyAdjustsScrollViewInsets = false -// extendedLayoutIncludesOpaqueBars = true -// navigationController?.view.backgroundColor = UIColor.white + pagingScrollView.contentInsetAdjustmentBehavior = .never // Listen for Media falsetifications NotificationCenter.default.addObserver( @@ -383,7 +381,7 @@ func floorcgf(x: CGFloat) -> CGFloat { toolbar.barTintColor = toolbarBarTintColor toolbar.backgroundColor = toolbarBackgroundColor toolbar.alpha = toolbarAlpha - toolbar.barStyle = .blackTranslucent + toolbar.barStyle = .black toolbar.isTranslucent = true toolbar.autoresizingMask = [.flexibleTopMargin, .flexibleWidth] @@ -643,7 +641,7 @@ func floorcgf(x: CGFloat) -> CGFloat { } // Set style - if !leaveStatusBarAlone && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone { + if !leaveStatusBarAlone && UIDevice.current.userInterfaceIdiom == .phone { previousStatusBarStyle = UIApplication.shared.statusBarStyle UIApplication.shared.setStatusBarStyle(statusBarStyle, animated: animated) } @@ -728,7 +726,7 @@ func floorcgf(x: CGFloat) -> CGFloat { setControlsHidden(hidden: false, animated: false, permanent: true) // Status bar - if !leaveStatusBarAlone && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone { + if !leaveStatusBarAlone && UIDevice.current.userInterfaceIdiom == .phone { UIApplication.shared.setStatusBarStyle(previousStatusBarStyle, animated: animated) } diff --git a/MediaBrowser/MediaBrowserDelegate.swift b/MediaBrowser/MediaBrowserDelegate.swift index 8c58aaf..4704308 100644 --- a/MediaBrowser/MediaBrowserDelegate.swift +++ b/MediaBrowser/MediaBrowserDelegate.swift @@ -9,8 +9,7 @@ import UIKit /// Required delegate to use MediaBrowser -@objc -public protocol MediaBrowserDelegate { +public protocol MediaBrowserDelegate: AnyObject { //MARK: Required methods /** diff --git a/MediaBrowser/MediaCaptionView.swift b/MediaBrowser/MediaCaptionView.swift index 8da550a..13ec471 100755 --- a/MediaBrowser/MediaCaptionView.swift +++ b/MediaBrowser/MediaCaptionView.swift @@ -70,10 +70,7 @@ public class MediaCaptionView: UIToolbar { tintColor = nil barTintColor = nil backgroundColor = UIColor.clear -// isOpaque = false -// isTranslucent = true -// clipsToBounds = true - barStyle = .blackTranslucent + barStyle = .black isTranslucent = true autoresizingMask = diff --git a/MediaBrowser/MediaZoomingScrollView.swift b/MediaBrowser/MediaZoomingScrollView.swift index 91c15b3..b4695b7 100755 --- a/MediaBrowser/MediaZoomingScrollView.swift +++ b/MediaBrowser/MediaZoomingScrollView.swift @@ -292,7 +292,7 @@ class MediaZoomingScrollView: UIScrollView, UIScrollViewDelegate, TapDetectingIm // Calculate Max var maxScale: CGFloat = 3.0 - if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad { + if UIDevice.current.userInterfaceIdiom == .pad { // Let them go a bit bigger on a bigger screen! maxScale = 4.0 } diff --git a/Podfile b/Podfile index d08c445..d1c6450 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -platform :ios, '8.1' +platform :ios, '13.0' target 'MediaBrowser' do use_frameworks!