Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MediaBrowser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 15.6;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -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 = 15.6;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/MediaBrowser+Paging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 Seungyoun Yi. All rights reserved.
//

import Foundation
import UIKit
extension MediaBrowser {
/**
setCurrentIndex to show first.
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/MediaBrowser+UIScrollViewDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 Seungyoun Yi. All rights reserved.
//

import Foundation
import UIKit

extension MediaBrowser: UIScrollViewDelegate {
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
Expand Down
10 changes: 4 additions & 6 deletions MediaBrowser/MediaBrowser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,7 @@ func floorcgf(x: CGFloat) -> CGFloat {


hidesBottomBarWhenPushed = true
automaticallyAdjustsScrollViewInsets = false
// extendedLayoutIncludesOpaqueBars = true
// navigationController?.view.backgroundColor = UIColor.white
pagingScrollView.contentInsetAdjustmentBehavior = .never

// Listen for Media falsetifications
NotificationCenter.default.addObserver(
Expand Down Expand Up @@ -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]

Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}

Expand Down
3 changes: 1 addition & 2 deletions MediaBrowser/MediaBrowserDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import UIKit

/// Required delegate to use MediaBrowser
@objc
public protocol MediaBrowserDelegate {
public protocol MediaBrowserDelegate: AnyObject {
//MARK: Required methods

/**
Expand Down
5 changes: 1 addition & 4 deletions MediaBrowser/MediaCaptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/MediaTapDetectingImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
//

import Foundation
import UIKit

class MediaTapDetectingImageView: UIImageView {
weak var tapDelegate: TapDetectingImageViewDelegate?
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/MediaTapDetectingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
//

import Foundation
import UIKit

class MediaTapDetectingView: UIView {
weak var tapDelegate: TapDetectingViewDelegate?
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/MediaZoomingScrollView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser/UIImageExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
//

import Foundation
import UIKit

public extension UIImage {
/// Get bundle Image or return nil when it is not exist
Expand Down
24 changes: 23 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "MediaBrowser"
name: "MediaBrowser",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "MediaBrowser",
targets: ["MediaBrowser"])
],
dependencies: [
.package(name: "SDWebImage", url: "https://github.com/SDWebImage/SDWebImage.git", .branch("master")),
.package(name: "UICircularProgressRing", url: "https://github.com/luispadron/UICircularProgressRing.git", from: "6.3.0")
],
targets: [
.target(
name: "MediaBrowser",
dependencies: ["SDWebImage", "UICircularProgressRing"],
path: "MediaBrowser"
)
]
)
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '8.1'
platform :ios, '15.6'

target 'MediaBrowser' do
use_frameworks!
Expand Down