Эх сурвалжийг харах

remove ios12

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 жил өмнө
parent
commit
7a4e345ec5

+ 8 - 16
iOSClient/AppDelegate.swift

@@ -168,15 +168,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
 
         // Background task: register
-        if #available(iOS 13.0, *) {
-            BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.refreshTask, using: nil) { task in
-                self.handleRefreshTask(task)
-            }
-            BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.processingTask, using: nil) { task in
-                self.handleProcessingTask(task)
-            }
-        } else {
-            application.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum)
+        BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.refreshTask, using: nil) { task in
+            self.handleRefreshTask(task)
+        }
+        BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.processingTask, using: nil) { task in
+            self.handleProcessingTask(task)
         }
 
         // Intro
@@ -303,10 +299,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             networkingProcessUpload?.stopTimer()
         }
 
-        if #available(iOS 13.0, *) {
-            scheduleAppRefresh()
-            scheduleBackgroundProcessing()
-        }
+        scheduleAppRefresh()
+        scheduleBackgroundProcessing()
 
         // Passcode
         presentPasscode { }
@@ -853,9 +847,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
                     
                 case NCGlobal.shared.actionScanDocument:
                     
-                    if #available(iOS 13.0, *) {
-                        NCCreateScanDocument.shared.openScannerDocument(viewController: rootViewController)
-                    }
+                    NCCreateScanDocument.shared.openScannerDocument(viewController: rootViewController)
                     
                 case NCGlobal.shared.actionTextDocument:
                     

+ 9 - 21
iOSClient/Brand/Intro/NCIntroViewController.swift

@@ -60,20 +60,12 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
             textColorOpponent = .black
         }
 
-        if #available(iOS 13.0, *) {
-            let navBarAppearance = UINavigationBarAppearance()
-            navBarAppearance.configureWithTransparentBackground()
-            navBarAppearance.shadowColor = .clear
-            navBarAppearance.shadowImage = UIImage()
-            self.navigationController?.navigationBar.standardAppearance = navBarAppearance
-            self.navigationController?.view.backgroundColor = NCBrandColor.shared.customer
-        } else {
-            self.navigationController?.navigationBar.isTranslucent = true
-            self.navigationController?.navigationBar.shadowImage = UIImage()
-            self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
-            self.navigationController?.navigationBar.backgroundColor = .clear
-            self.navigationController?.navigationBar.barTintColor = NCBrandColor.shared.customer
-        }
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithTransparentBackground()
+        navBarAppearance.shadowColor = .clear
+        navBarAppearance.shadowImage = UIImage()
+        self.navigationController?.navigationBar.standardAppearance = navBarAppearance
+        self.navigationController?.view.backgroundColor = NCBrandColor.shared.customer
         self.navigationController?.navigationBar.tintColor = textColor
 
         pageControl.currentPageIndicatorTintColor = textColor
@@ -108,14 +100,10 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
     }
 
     override var preferredStatusBarStyle: UIStatusBarStyle {
-        if #available(iOS 13.0, *) {
-            if traitCollection.userInterfaceStyle == .light {
-                return .lightContent
-            } else {
-                return .darkContent
-            }
-        } else {
+        if traitCollection.userInterfaceStyle == .light {
             return .lightContent
+        } else {
+            return .darkContent
         }
     }
 

+ 1 - 3
iOSClient/Extensions/UIApplication+Orientation.swift

@@ -27,10 +27,8 @@ extension UIApplication {
     var isLandscape: Bool {
         if UIDevice.current.orientation.isValidInterfaceOrientation {
             return UIDevice.current.orientation.isLandscape
-        } else if #available(iOS 13.0, *) {
+        } else  {
             return windows.first?.windowScene?.interfaceOrientation.isLandscape ?? false
-        } else {
-            return statusBarOrientation.isLandscape
         }
     }
 }

+ 4 - 2
iOSClient/Extensions/UIImage+Extensions.swift

@@ -140,14 +140,16 @@ extension UIImage {
 
     func imageColor(_ color: UIColor) -> UIImage {
         
-        if #available(iOS 13.0, *) {
-            return self.withTintColor(color, renderingMode: .alwaysOriginal)
+        //if #available(iOS 13.0, *) {
+        return self.withTintColor(color, renderingMode: .alwaysOriginal)
+        /*
         } else {
             return UIGraphicsImageRenderer(size: size, format: imageRendererFormat).image { _ in
                 color.set()
                 withRenderingMode(.alwaysTemplate).draw(at: .zero)
             }
         }
+        */
     }
 
     func isEqualToImage(image: UIImage?) -> Bool {

+ 8 - 16
iOSClient/Login/NCLogin.swift

@@ -96,22 +96,14 @@ class NCLogin: UIViewController, UITextFieldDelegate, NCLoginQRCodeDelegate {
         certificate.isEnabled = false
 
         // navigation
-        if #available(iOS 13.0, *) {
-            let navBarAppearance = UINavigationBarAppearance()
-            navBarAppearance.configureWithTransparentBackground()
-            navBarAppearance.shadowColor = .clear
-            navBarAppearance.shadowImage = UIImage()
-            navBarAppearance.titleTextAttributes = [.foregroundColor: textColor]
-            navBarAppearance.largeTitleTextAttributes = [.foregroundColor: textColor]
-            self.navigationController?.navigationBar.standardAppearance = navBarAppearance
-            self.navigationController?.view.backgroundColor = NCBrandColor.shared.customer
-        } else {
-            self.navigationController?.navigationBar.isTranslucent = true
-            self.navigationController?.navigationBar.shadowImage = UIImage()
-            self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
-            self.navigationController?.navigationBar.backgroundColor = .clear
-            self.navigationController?.navigationBar.barTintColor = NCBrandColor.shared.customer
-        }
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithTransparentBackground()
+        navBarAppearance.shadowColor = .clear
+        navBarAppearance.shadowImage = UIImage()
+        navBarAppearance.titleTextAttributes = [.foregroundColor: textColor]
+        navBarAppearance.largeTitleTextAttributes = [.foregroundColor: textColor]
+        self.navigationController?.navigationBar.standardAppearance = navBarAppearance
+        self.navigationController?.view.backgroundColor = NCBrandColor.shared.customer
         self.navigationController?.navigationBar.tintColor = textColor
 
         if NCManageDatabase.shared.getAccounts()?.count ?? 0 == 0 {

+ 2 - 4
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -854,10 +854,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
 
     func tapButton3(_ sender: Any) {
 
-        if #available(iOS 13.0, *) {
-            if let viewController = appDelegate.window?.rootViewController {
-                NCCreateScanDocument.shared.openScannerDocument(viewController: viewController)
-            }
+        if let viewController = appDelegate.window?.rootViewController {
+            NCCreateScanDocument.shared.openScannerDocument(viewController: viewController)
         }
     }
 

+ 1 - 7
iOSClient/Main/NCFunctionCenter.swift

@@ -72,13 +72,7 @@ import Photos
         case NCGlobal.shared.selectorLoadFileQuickLook:
             let fileNamePath = NSTemporaryDirectory() + metadata.fileNameView
             CCUtility.copyFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView), toPath: fileNamePath)
-
-            var editingMode = false
-            if #available(iOS 13.0, *) {
-                editingMode = true
-            }
-
-            let viewerQuickLook = NCViewerQuickLook(with: URL(fileURLWithPath: fileNamePath), isEditingEnabled: editingMode, metadata: metadata)
+            let viewerQuickLook = NCViewerQuickLook(with: URL(fileURLWithPath: fileNamePath), isEditingEnabled: true, metadata: metadata)
             self.appDelegate.window?.rootViewController?.present(viewerQuickLook, animated: true)
 
         case NCGlobal.shared.selectorLoadFileView:

+ 11 - 22
iOSClient/Main/NCMainNavigationController.swift

@@ -30,31 +30,20 @@ class NCMainNavigationController: UINavigationController {
     required init?(coder: NSCoder) {
         super.init(coder: coder)
 
-        if #available(iOS 13.0, *) {
+        let appearance = UINavigationBarAppearance()
 
-            let appearance = UINavigationBarAppearance()
+        appearance.configureWithOpaqueBackground()
+        appearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
+        appearance.backgroundColor = NCBrandColor.shared.systemBackground
+        appearance.configureWithOpaqueBackground()
+        appearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
+        appearance.backgroundColor = NCBrandColor.shared.systemBackground
 
-            appearance.configureWithOpaqueBackground()
-            appearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
-            appearance.backgroundColor = NCBrandColor.shared.systemBackground
-            appearance.configureWithOpaqueBackground()
-            appearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
-            appearance.backgroundColor = NCBrandColor.shared.systemBackground
-
-            appearance.shadowColor = .clear
-            appearance.shadowImage = UIImage()
-
-            navigationBar.scrollEdgeAppearance = appearance
-            navigationBar.standardAppearance = appearance
-
-        } else {
-
-            navigationBar.barStyle = .default
-            navigationBar.barTintColor = NCBrandColor.shared.systemBackground
-            navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
-            navigationBar.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.label]
-        }
+        appearance.shadowColor = .clear
+        appearance.shadowImage = UIImage()
 
+        navigationBar.scrollEdgeAppearance = appearance
+        navigationBar.standardAppearance = appearance
         navigationBar.tintColor = .systemBlue
     }
 }

+ 7 - 9
iOSClient/Menu/AppDelegate+Menu.swift

@@ -82,17 +82,15 @@ extension AppDelegate {
             )
         }
 
-        if #available(iOS 13.0, *) {
-            actions.append(
-                NCMenuAction(
-                    title: NSLocalizedString("_scans_document_", comment: ""), icon: NCUtility.shared.loadImage(named: "scan"), action: { _ in
-                        if let viewController = appDelegate.window?.rootViewController {
-                            NCCreateScanDocument.shared.openScannerDocument(viewController: viewController)
-                        }
+        actions.append(
+            NCMenuAction(
+                title: NSLocalizedString("_scans_document_", comment: ""), icon: NCUtility.shared.loadImage(named: "scan"), action: { _ in
+                    if let viewController = appDelegate.window?.rootViewController {
+                        NCCreateScanDocument.shared.openScannerDocument(viewController: viewController)
                     }
-                )
+                }
             )
-        }
+        )
 
         actions.append(
             NCMenuAction(

+ 18 - 22
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -219,18 +219,16 @@ extension NCCollectionViewCommon {
         //
         // SAVE AS SCAN
         //
-        if #available(iOS 13.0, *) {
-            if metadata.classFile == NKCommon.typeClassFile.image.rawValue && metadata.contentType != "image/svg+xml" {
-                actions.append(
-                    NCMenuAction(
-                        title: NSLocalizedString("_save_as_scan_", comment: ""),
-                        icon: NCUtility.shared.loadImage(named: "viewfinder.circle"),
-                        action: { _ in
-                            NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorSaveAsScan)
-                        }
-                    )
+        if metadata.classFile == NKCommon.typeClassFile.image.rawValue && metadata.contentType != "image/svg+xml" {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_save_as_scan_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "viewfinder.circle"),
+                    action: { _ in
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorSaveAsScan)
+                    }
                 )
-            }
+            )
         }
 
         //
@@ -274,18 +272,16 @@ extension NCCollectionViewCommon {
         //
         // MODIFY
         //
-        if #available(iOS 13.0, *) {
-            if !isFolderEncrypted && metadata.contentType != "image/gif" && metadata.contentType != "image/svg+xml" && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NKCommon.typeClassFile.image.rawValue) {
-                actions.append(
-                    NCMenuAction(
-                        title: NSLocalizedString("_modify_", comment: ""),
-                        icon: NCUtility.shared.loadImage(named: "pencil.tip.crop.circle"),
-                        action: { menuAction in
-                            NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorLoadFileQuickLook)
-                        }
-                    )
+        if !isFolderEncrypted && metadata.contentType != "image/gif" && metadata.contentType != "image/svg+xml" && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NKCommon.typeClassFile.image.rawValue) {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_modify_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "pencil.tip.crop.circle"),
+                    action: { menuAction in
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorLoadFileQuickLook)
+                    }
                 )
-            }
+            )
         }
 
         //

+ 18 - 22
iOSClient/Menu/NCViewer+Menu.swift

@@ -132,18 +132,16 @@ extension NCViewer {
         //
         // SAVE AS SCAN
         //
-        if #available(iOS 13.0, *) {
-            if metadata.classFile == NKCommon.typeClassFile.image.rawValue && metadata.contentType != "image/svg+xml" {
-                actions.append(
-                    NCMenuAction(
-                        title: NSLocalizedString("_save_as_scan_", comment: ""),
-                        icon: NCUtility.shared.loadImage(named: "viewfinder.circle"),
-                        action: { _ in
-                            NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorSaveAsScan)
-                        }
-                    )
+        if metadata.classFile == NKCommon.typeClassFile.image.rawValue && metadata.contentType != "image/svg+xml" {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_save_as_scan_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "viewfinder.circle"),
+                    action: { _ in
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorSaveAsScan)
+                    }
                 )
-            }
+            )
         }
 
         //
@@ -243,18 +241,16 @@ extension NCViewer {
         //
         // MODIFY
         //
-        if #available(iOS 13.0, *) {
-            if !isFolderEncrypted && metadata.contentType != "image/gif" && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NKCommon.typeClassFile.image.rawValue) {
-                actions.append(
-                    NCMenuAction(
-                        title: NSLocalizedString("_modify_", comment: ""),
-                        icon: NCUtility.shared.loadImage(named: "pencil.tip.crop.circle"),
-                        action: { _ in
-                            NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorLoadFileQuickLook)
-                        }
-                    )
+        if !isFolderEncrypted && metadata.contentType != "image/gif" && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NKCommon.typeClassFile.image.rawValue) {
+            actions.append(
+                NCMenuAction(
+                    title: NSLocalizedString("_modify_", comment: ""),
+                    icon: NCUtility.shared.loadImage(named: "pencil.tip.crop.circle"),
+                    action: { _ in
+                        NCFunctionCenter.shared.openDownload(metadata: metadata, selector: NCGlobal.shared.selectorLoadFileQuickLook)
+                    }
                 )
-            }
+            )
         }
 
         //

+ 5 - 7
iOSClient/More/NCMore.swift

@@ -139,13 +139,11 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         functionMenu.append(item)
 
         // ITEM : Scan
-        if #available(iOS 13.0, *) {
-            item = NKExternalSite()
-            item.name = "_scanned_images_"
-            item.icon = "scan"
-            item.url = "openStoryboardNCScan"
-            functionMenu.append(item)
-        }
+        item = NKExternalSite()
+        item.name = "_scanned_images_"
+        item.icon = "scan"
+        item.url = "openStoryboardNCScan"
+        functionMenu.append(item)
 
         // ITEM : Trash
         let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)

+ 1 - 3
iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift

@@ -73,9 +73,7 @@ class NCViewerRichWorkspaceWebView: UIViewController, WKNavigationDelegate, WKSc
 
             if message.body as? String == "close" {
 
-                if #available(iOS 13.0, *) {
-                    self.presentationController?.delegate?.presentationControllerWillDismiss?(self.presentationController!)
-                }
+                self.presentationController?.delegate?.presentationControllerWillDismiss?(self.presentationController!)
 
                 dismiss(animated: true) {
                     NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterCloseRichWorkspaceWebView, userInfo: nil)

+ 2 - 4
iOSClient/Share/Advanced/NCShareAdvancePermission.swift

@@ -68,10 +68,8 @@ class NCShareAdvancePermission: UITableViewController, NCShareAdvanceFotterDeleg
         tableView.rowHeight = UITableView.automaticDimension
         self.setNavigationTitle()
         self.navigationItem.hidesBackButton = true
-        if #available(iOS 13.0, *) {
-            // disbale pull to dimiss
-            isModalInPresentation = true
-        }
+        // disbale pull to dimiss
+        isModalInPresentation = true
     }
 
     override func viewWillLayoutSubviews() {

+ 18 - 41
iOSClient/Utility/NCUtility.swift

@@ -700,12 +700,9 @@ class NCUtility: NSObject {
     }
 
     func getDefaultUserIcon() -> UIImage {
-        if #available(iOS 13.0, *) {
-            let config = UIImage.SymbolConfiguration(pointSize: 30)
-            return NCUtility.shared.loadImage(named: "person.crop.circle", symbolConfiguration: config)
-        } else {
-            return NCUtility.shared.loadImage(named: "person.crop.circle", size: 30)
-        }
+            
+        let config = UIImage.SymbolConfiguration(pointSize: 30)
+        return NCUtility.shared.loadImage(named: "person.crop.circle", symbolConfiguration: config)
     }
 
     @objc func createAvatar(image: UIImage, size: CGFloat) -> UIImage {
@@ -849,44 +846,24 @@ class NCUtility: NSObject {
 
     func colorNavigationController(_ navigationController: UINavigationController?, backgroundColor: UIColor, titleColor: UIColor, tintColor: UIColor?, withoutShadow: Bool) {
 
-        if #available(iOS 13.0, *) {
-
-            // iOS 14, 15
-            let appearance = UINavigationBarAppearance()
-            appearance.titleTextAttributes = [.foregroundColor: titleColor]
-            appearance.largeTitleTextAttributes = [.foregroundColor: titleColor]
-
-            if withoutShadow {
-                appearance.shadowColor = .clear
-                appearance.shadowImage = UIImage()
-            }
-
-            if let tintColor = tintColor {
-                navigationController?.navigationBar.tintColor = tintColor
-            }
-
-            navigationController?.view.backgroundColor = backgroundColor
-            navigationController?.navigationBar.barTintColor = titleColor
-            navigationController?.navigationBar.standardAppearance = appearance
-            navigationController?.navigationBar.compactAppearance = appearance
-            navigationController?.navigationBar.scrollEdgeAppearance = appearance
-
-        } else {
-
-            navigationController?.navigationBar.isTranslucent = true
-            navigationController?.navigationBar.barTintColor = backgroundColor
+        let appearance = UINavigationBarAppearance()
+        appearance.titleTextAttributes = [.foregroundColor: titleColor]
+        appearance.largeTitleTextAttributes = [.foregroundColor: titleColor]
 
-            if withoutShadow {
-                navigationController?.navigationBar.shadowImage = UIImage()
-                navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
-            }
+        if withoutShadow {
+            appearance.shadowColor = .clear
+            appearance.shadowImage = UIImage()
+        }
 
-            let titleDict: NSDictionary = [NSAttributedString.Key.foregroundColor: titleColor]
-            navigationController?.navigationBar.titleTextAttributes = titleDict as? [NSAttributedString.Key: Any]
-            if let tintColor = tintColor {
-                navigationController?.navigationBar.tintColor = tintColor
-            }
+        if let tintColor = tintColor {
+            navigationController?.navigationBar.tintColor = tintColor
         }
+
+        navigationController?.view.backgroundColor = backgroundColor
+        navigationController?.navigationBar.barTintColor = titleColor
+        navigationController?.navigationBar.standardAppearance = appearance
+        navigationController?.navigationBar.compactAppearance = appearance
+        navigationController?.navigationBar.scrollEdgeAppearance = appearance
     }
 
     func getEncondingDataType(data: Data) -> String.Encoding? {

+ 4 - 20
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -116,11 +116,7 @@ class NCPlayerToolBar: UIView {
         backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .lightGray), for: .normal)
         backButton.isEnabled = false
 
-        if #available(iOS 13.0, *) {
-            playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
-        } else {
-            playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, size: 30), for: .normal)
-        }
+        playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
         playButton.isEnabled = false
 
         forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .lightGray), for: .normal)
@@ -197,11 +193,7 @@ class NCPlayerToolBar: UIView {
         labelLeftTime.text = "-" + NCUtility.shared.stringFromTime(ncplayer.durationTime - time)
 
         // BACK
-        if #available(iOS 13.0, *) {
-            backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
-        } else {
-            backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white, size: 30), for: .normal)
-        }
+        backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
         backButton.isEnabled = true
 
         // PLAY
@@ -211,19 +203,11 @@ class NCPlayerToolBar: UIView {
             MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyPlaybackRate] = 0
         }
         let namedPlay = ncplayer.isPlay() ? "pause.fill" : "play.fill"
-        if #available(iOS 13.0, *) {
-            playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
-        } else {
-            playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, size: 30), for: .normal)
-        }
+        playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
         playButton.isEnabled = true
 
         // FORWARD
-        if #available(iOS 13.0, *) {
-            forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white), for: .normal)
-        } else {
-            forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white, size: 30), for: .normal)
-        }
+        forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white), for: .normal)
         forwardButton.isEnabled = true
     }
 

+ 1 - 5
iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

@@ -64,11 +64,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         filePath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!
         pdfDocument = PDFDocument(url: URL(fileURLWithPath: filePath))
         let pageCount = CGFloat(pdfDocument?.pageCount ?? 0)
-        if #available(iOS 13.0, *) {
-            defaultBackgroundColor = pdfView.backgroundColor
-        } else {
-            defaultBackgroundColor = .lightGray
-        }
+        defaultBackgroundColor = pdfView.backgroundColor
         view.backgroundColor = defaultBackgroundColor
 
         navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))