Skip to content

Commit fcefcd4

Browse files
committed
Merge changes from PR younatics#86
1 parent 7df1e70 commit fcefcd4

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

MediaBrowser/MediaBrowser.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ func floorcgf(x: CGFloat) -> CGFloat {
290290

291291

292292
hidesBottomBarWhenPushed = true
293-
automaticallyAdjustsScrollViewInsets = false
294-
// extendedLayoutIncludesOpaqueBars = true
295-
// navigationController?.view.backgroundColor = UIColor.white
293+
pagingScrollView.contentInsetAdjustmentBehavior = .never
296294

297295
// Listen for Media falsetifications
298296
NotificationCenter.default.addObserver(
@@ -383,7 +381,7 @@ func floorcgf(x: CGFloat) -> CGFloat {
383381
toolbar.barTintColor = toolbarBarTintColor
384382
toolbar.backgroundColor = toolbarBackgroundColor
385383
toolbar.alpha = toolbarAlpha
386-
toolbar.barStyle = .blackTranslucent
384+
toolbar.barStyle = .black
387385
toolbar.isTranslucent = true
388386
toolbar.autoresizingMask = [.flexibleTopMargin, .flexibleWidth]
389387

@@ -643,7 +641,7 @@ func floorcgf(x: CGFloat) -> CGFloat {
643641
}
644642

645643
// Set style
646-
if !leaveStatusBarAlone && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone {
644+
if !leaveStatusBarAlone && UIDevice.current.userInterfaceIdiom == .phone {
647645
previousStatusBarStyle = UIApplication.shared.statusBarStyle
648646
UIApplication.shared.setStatusBarStyle(statusBarStyle, animated: animated)
649647
}

MediaBrowser/MediaBrowserDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010

1111
/// Required delegate to use MediaBrowser
1212
@objc
13-
public protocol MediaBrowserDelegate {
13+
public protocol MediaBrowserDelegate: AnyObject {
1414
//MARK: Required methods
1515

1616
/**

MediaBrowser/MediaCaptionView.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ public class MediaCaptionView: UIToolbar {
7070
tintColor = nil
7171
barTintColor = nil
7272
backgroundColor = UIColor.clear
73-
// isOpaque = false
74-
// isTranslucent = true
75-
// clipsToBounds = true
76-
barStyle = .blackTranslucent
73+
barStyle = .black
7774
isTranslucent = true
7875

7976
autoresizingMask =

MediaBrowser/MediaZoomingScrollView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class MediaZoomingScrollView: UIScrollView, UIScrollViewDelegate, TapDetectingIm
292292

293293
// Calculate Max
294294
var maxScale: CGFloat = 3.0
295-
if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad {
295+
if UIDevice.current.userInterfaceIdiom == .pad {
296296
// Let them go a bit bigger on a bigger screen!
297297
maxScale = 4.0
298298
}

0 commit comments

Comments
 (0)