Sfoglia il codice sorgente

Merge pull request #2160 from nextcloud/remove_ios12

Remove ios12
Marino Faggiana 2 anni fa
parent
commit
dd7a599c78
77 ha cambiato i file con 518 aggiunte e 880 eliminazioni
  1. 2 2
      Nextcloud.xcodeproj/project.pbxproj
  2. 2 2
      Share/NCShareCell.swift
  3. 1 1
      Share/NCShareExtension+DataSource.swift
  4. 6 6
      Share/NCShareExtension.swift
  5. 1 1
      Widget/Dashboard/DashboardData.swift
  6. 3 3
      iOSClient/Account Request/NCAccountRequest.swift
  7. 7 7
      iOSClient/Activity/NCActivity.swift
  8. 1 1
      iOSClient/Activity/NCActivityCommentView.swift
  9. 8 20
      iOSClient/AppDelegate.swift
  10. 9 21
      iOSClient/Brand/Intro/NCIntroViewController.swift
  11. 2 212
      iOSClient/Brand/NCBrand.swift
  12. 1 1
      iOSClient/BrowserWeb/NCBrowserWeb.swift
  13. 11 11
      iOSClient/Color/NCColorPicker.swift
  14. 25 25
      iOSClient/Diagnostics/NCCapabilitiesViewController.swift
  15. 1 1
      iOSClient/EmptyView/NCEmptyDataSet.swift
  16. 1 3
      iOSClient/Extensions/UIApplication+Orientation.swift
  17. 2 9
      iOSClient/Extensions/UIImage+Extensions.swift
  18. 8 16
      iOSClient/Login/NCLogin.swift
  19. 1 1
      iOSClient/Login/NCLoginWeb.swift
  20. 7 12
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
  21. 2 2
      iOSClient/Main/Collection Common/NCGridCell.swift
  22. 3 3
      iOSClient/Main/Collection Common/NCListCell.swift
  23. 12 12
      iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift
  24. 7 7
      iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift
  25. 9 9
      iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift
  26. 13 15
      iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift
  27. 9 9
      iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift
  28. 1 8
      iOSClient/Main/NCFunctionCenter.swift
  29. 11 22
      iOSClient/Main/NCMainNavigationController.swift
  30. 2 2
      iOSClient/Main/NCMainTabBar.swift
  31. 5 5
      iOSClient/Main/Section Header Footer/NCSectionHeaderFooter.swift
  32. 2 4
      iOSClient/Media/NCMedia.swift
  33. 7 9
      iOSClient/Menu/AppDelegate+Menu.swift
  34. 18 22
      iOSClient/Menu/NCCollectionViewCommon+Menu.swift
  35. 1 1
      iOSClient/Menu/NCMenu+FloatingPanel.swift
  36. 1 1
      iOSClient/Menu/NCMenu.swift
  37. 18 22
      iOSClient/Menu/NCViewer+Menu.swift
  38. 2 2
      iOSClient/Menu/UIViewController+Menu.swift
  39. 15 17
      iOSClient/More/NCMore.swift
  40. 0 1
      iOSClient/More/NCMoreUserCell.xib
  41. 0 1
      iOSClient/Networking/NCNetworking.swift
  42. 6 6
      iOSClient/Notification/NCNotification.swift
  43. 3 3
      iOSClient/RichWorkspace/NCViewerRichWorkspace.swift
  44. 1 3
      iOSClient/RichWorkspace/NCViewerRichWorkspaceWebView.swift
  45. 0 3
      iOSClient/ScanDocument/NCScan+CollectionView.swift
  46. 9 11
      iOSClient/ScanDocument/NCScan.swift
  47. 7 7
      iOSClient/Select/NCSelect.swift
  48. 29 29
      iOSClient/Settings/CCAdvanced.m
  49. 54 59
      iOSClient/Settings/CCManageAccount.m
  50. 20 20
      iOSClient/Settings/CCManageAutoUpload.m
  51. 12 12
      iOSClient/Settings/NCManageAutoUploadFileName.swift
  52. 16 16
      iOSClient/Settings/NCManageEndToEndEncryption.m
  53. 22 22
      iOSClient/Settings/NCSettings.m
  54. 2 4
      iOSClient/Share/Advanced/NCShareAdvancePermission.swift
  55. 2 2
      iOSClient/Share/Advanced/NCShareAdvancePermissionFooter.swift
  56. 2 2
      iOSClient/Share/Advanced/NCShareAdvancePermissionHeader.swift
  57. 4 4
      iOSClient/Share/NCShare.swift
  58. 11 11
      iOSClient/Share/NCShareCommon.swift
  59. 1 1
      iOSClient/Share/NCShareLinkCell.swift
  60. 10 10
      iOSClient/Share/NCSharePaging.swift
  61. 1 1
      iOSClient/Share/NCShareUserCell.swift
  62. 1 1
      iOSClient/Transfers/NCTransferCell.swift
  63. 1 2
      iOSClient/Transfers/NCTransfers.swift
  64. 2 2
      iOSClient/Trash/Cell/NCTrashListCell+NCTrashCellProtocol.swift
  65. 2 2
      iOSClient/Trash/NCTrash.swift
  66. 16 22
      iOSClient/UserStatus/NCUserStatus.swift
  67. 1 1
      iOSClient/Utility/NCActivityIndicator.swift
  68. 25 53
      iOSClient/Utility/NCUtility.swift
  69. 4 20
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift
  70. 3 3
      iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift
  71. 1 1
      iOSClient/Viewer/NCViewerMedia/NCViewerMediaDetailView.swift
  72. 5 5
      iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift
  73. 1 1
      iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift
  74. 5 9
      iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift
  75. 1 1
      iOSClient/Viewer/NCViewerPDF/NCViewerPDFSearch.swift
  76. 0 1
      iOSClient/Viewer/NCViewerQuickLook/NCViewerQuickLook.swift
  77. 1 1
      iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

+ 2 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -3342,7 +3342,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 12.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -3402,7 +3402,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 12.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 2 - 2
Share/NCShareCell.swift

@@ -42,7 +42,7 @@ class NCShareCell: UITableViewCell {
         self.fileName = fileName
         let resultInternalType = NKCommon.shared.getInternalType(fileName: fileName, mimeType: "", directory: false)
 
-        backgroundColor = NCBrandColor.shared.systemBackground
+        backgroundColor = .systemBackground
         imageCell?.layer.cornerRadius = 6
         imageCell?.layer.masksToBounds = true
 
@@ -61,7 +61,7 @@ class NCShareCell: UITableViewCell {
         let fileSize = NCUtilityFileSystem.shared.getFileSize(filePath: (NSTemporaryDirectory() + fileName))
         sizeCell?.text = CCUtility.transformedSize(fileSize)
 
-        moreButton?.setImage(NCUtility.shared.loadImage(named: "more").image(color: NCBrandColor.shared.label, size: 15), for: .normal)
+        moreButton?.setImage(NCUtility.shared.loadImage(named: "more").image(color: .label, size: 15), for: .normal)
     }
 
     @IBAction func buttonTapped(_ sender: Any) {

+ 1 - 1
Share/NCShareExtension+DataSource.swift

@@ -67,7 +67,7 @@ extension NCShareExtension: UICollectionViewDataSource {
         cell.fileObjectId = metadata.ocId
         cell.fileUser = metadata.ownerId
         cell.labelTitle.text = metadata.fileNameView
-        cell.labelTitle.textColor = NCBrandColor.shared.label
+        cell.labelTitle.textColor = .label
 
         cell.imageSelect.image = nil
         cell.imageStatus.image = nil

+ 6 - 6
Share/NCShareExtension.swift

@@ -85,27 +85,27 @@ class NCShareExtension: UIViewController {
 
         collectionView.addSubview(refreshControl)
         refreshControl.tintColor = NCBrandColor.shared.brandText
-        refreshControl.backgroundColor = NCBrandColor.shared.systemBackground
+        refreshControl.backgroundColor = .systemBackground
         refreshControl.addTarget(self, action: #selector(reloadDatasource), for: .valueChanged)
 
-        commandView.backgroundColor = NCBrandColor.shared.secondarySystemBackground
-        separatorView.backgroundColor = NCBrandColor.shared.separator
+        commandView.backgroundColor = .secondarySystemBackground
+        separatorView.backgroundColor = .separator
         separatorHeightConstraint.constant = 0.5
 
-        tableView.separatorColor = NCBrandColor.shared.separator
+        tableView.separatorColor = .separator
         tableView.layer.cornerRadius = 10
         tableView.tableFooterView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: 1)))
         commandViewHeightConstraint.constant = heightCommandView
 
         createFolderView.layer.cornerRadius = 10
-        createFolderImage.image = NCUtility.shared.loadImage(named: "folder.badge.plus", color: NCBrandColor.shared.label)
+        createFolderImage.image = NCUtility.shared.loadImage(named: "folder.badge.plus", color: .label)
         createFolderLabel.text = NSLocalizedString("_create_folder_", comment: "")
         let createFolderGesture = UITapGestureRecognizer(target: self, action: #selector(actionCreateFolder))
         createFolderView.addGestureRecognizer(createFolderGesture)
 
         uploadView.layer.cornerRadius = 10
 
-        // uploadImage.image = NCUtility.shared.loadImage(named: "square.and.arrow.up", color: NCBrandColor.shared.label)
+        // uploadImage.image = NCUtility.shared.loadImage(named: "square.and.arrow.up", color: .label)
         uploadLabel.text = NSLocalizedString("_upload_", comment: "")
         uploadLabel.textColor = .systemBlue
         let uploadGesture = UITapGestureRecognizer(target: self, action: #selector(actionUpload))

+ 1 - 1
Widget/Dashboard/DashboardData.swift

@@ -147,7 +147,7 @@ func getDashboardDataEntry(intent: Applications, isPreview: Bool, displaySize: C
     if let fileName = tableDashboard?.iconClass {
         let fileNamePath: String = CCUtility.getDirectoryUserData() + "/" + fileName + ".png"
         if let image = UIImage(contentsOfFile: fileNamePath) {
-            titleImage = image.imageColor(NCBrandColor.shared.label)
+            titleImage = image.withTintColor(.label, renderingMode: .alwaysOriginal)
         }
     }
         

+ 3 - 3
iOSClient/Account Request/NCAccountRequest.swift

@@ -61,13 +61,13 @@ class NCAccountRequest: UIViewController {
 
         titleLabel.text = NSLocalizedString("_account_select_", comment: "")
 
-        closeButton.setImage(NCUtility.shared.loadImage(named: "xmark", color: NCBrandColor.shared.label), for: .normal)
+        closeButton.setImage(NCUtility.shared.loadImage(named: "xmark", color: .label), for: .normal)
 
         tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 1))
         tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
 
-        view.backgroundColor = NCBrandColor.shared.secondarySystemBackground
-        tableView.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        view.backgroundColor = .secondarySystemBackground
+        tableView.backgroundColor = .secondarySystemBackground
 
         progressView.trackTintColor = .clear
         progressView.progress = 1

+ 7 - 7
iOSClient/Activity/NCActivity.swift

@@ -60,13 +60,13 @@ class NCActivity: UIViewController, NCSharePagingContent {
         super.viewDidLoad()
 
         self.navigationController?.navigationBar.prefersLargeTitles = true
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
         self.title = NSLocalizedString("_activity_", comment: "")
 
         tableView.allowsSelection = false
         tableView.separatorColor = UIColor.clear
         tableView.contentInset = insets
-        tableView.backgroundColor = NCBrandColor.shared.systemBackground
+        tableView.backgroundColor = .systemBackground
 
         if showComments {
             setupComments()
@@ -163,7 +163,7 @@ extension NCActivity: UITableViewDelegate {
 
         let label = UILabel()
         label.font = UIFont.boldSystemFont(ofSize: 13)
-        label.textColor = NCBrandColor.shared.label
+        label.textColor = .label
         label.text = CCUtility.getTitleSectionDate(sectionDates[section])
         label.textAlignment = .center
         label.layer.cornerRadius = 11
@@ -218,13 +218,13 @@ extension NCActivity: UITableViewDataSource {
         NCOperationQueue.shared.downloadAvatar(user: comment.actorId, dispalyName: comment.actorDisplayName, fileName: fileName, cell: cell, view: tableView, cellImageView: cell.fileAvatarImageView)
         // Username
         cell.labelUser.text = comment.actorDisplayName
-        cell.labelUser.textColor = NCBrandColor.shared.label
+        cell.labelUser.textColor = .label
         // Date
         cell.labelDate.text = CCUtility.dateDiff(comment.creationDateTime as Date)
-        cell.labelDate.textColor = NCBrandColor.shared.systemGray4
+        cell.labelDate.textColor = .systemGray4
         // Message
         cell.labelMessage.text = comment.message
-        cell.labelMessage.textColor = NCBrandColor.shared.label
+        cell.labelMessage.textColor = .label
         // Button Menu
         if comment.actorId == appDelegate.userId {
             cell.buttonMenu.isHidden = false
@@ -248,7 +248,7 @@ extension NCActivity: UITableViewDataSource {
         cell.avatar.isHidden = true
         cell.subjectTrailingConstraint.constant = 10
         cell.didSelectItemEnable = self.didSelectItemEnable
-        cell.subject.textColor = NCBrandColor.shared.label
+        cell.subject.textColor = .label
         cell.viewController = self
 
         // icon

+ 1 - 1
iOSClient/Activity/NCActivityCommentView.swift

@@ -48,7 +48,7 @@ class NCActivityCommentView: UIView, UITextFieldDelegate {
         } else {
             labelUser.text = account.displayName
         }
-        labelUser.textColor = NCBrandColor.shared.label
+        labelUser.textColor = .label
     }
 
     func textFieldShouldReturn(_ textField: UITextField) -> Bool {

+ 8 - 20
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 { }
@@ -353,7 +347,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
 
     // MARK: - Background Task
 
-    @available(iOS 13.0, *)
     func scheduleAppRefresh() {
 
         let request = BGAppRefreshTaskRequest(identifier: NCGlobal.shared.refreshTask)
@@ -366,7 +359,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
     }
 
-    @available(iOS 13.0, *)
     func scheduleBackgroundProcessing() {
 
         let request = BGProcessingTaskRequest(identifier: NCGlobal.shared.processingTask)
@@ -381,7 +373,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
     }
 
-    @available(iOS 13.0, *)
     func handleRefreshTask(_ task: BGTask) {
 
         if account == "" {
@@ -399,7 +390,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
     }
 
-    @available(iOS 13.0, *)
     func handleProcessingTask(_ task: BGTask) {
 
         if account == "" {
@@ -857,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
         }
     }
 

+ 2 - 212
iOSClient/Brand/NCBrand.swift

@@ -163,225 +163,15 @@ class NCBrandColor: NSObject {
     public var themingColorElement: String = ""
     public var themingColorText: String = ""
 
-    @objc public var annotationColor: UIColor {
-        get {
-            return .systemBlue
-        }
-    }
-
-    @objc public var systemBlue: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemBlue
-            } else {
-                return UIColor(red: 0.0, green: 122.0 / 255.0, blue: 1.0, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemIndigo: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemIndigo
-            } else {
-                return UIColor(red: 88.0 / 255.0, green: 86.0 / 255.0, blue: 214.0 / 255.0, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemPink: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemPink
-            } else {
-                return UIColor(red: 1.0, green: 45.0 / 255.0, blue: 85.0 / 255.0, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemTeal: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemTeal
-            } else {
-                return UIColor(red: 90.0 / 255.0, green: 200.0 / 255.0, blue: 250.0 / 255.0, alpha: 1.0)
-            }
-        }
-    }
-
     @objc public var systemMint: UIColor {
         get {
             return UIColor(red: 0.0 / 255.0, green: 199.0 / 255.0, blue: 190.0 / 255.0, alpha: 1.0)
         }
     }
 
-    @objc public var systemBackground: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemBackground
-            } else {
-                return .white
-            }
-        }
-    }
-
-    @objc public var secondarySystemBackground: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .secondarySystemBackground
-            } else {
-                return UIColor(red: 0.95, green: 0.95, blue: 0.97, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var tertiarySystemBackground: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .tertiarySystemBackground
-            } else {
-                return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGroupedBackground: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGroupedBackground
-            } else {
-                return UIColor(red: 0.95, green: 0.95, blue: 0.97, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var secondarySystemGroupedBackground: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .secondarySystemGroupedBackground
-            } else {
-                return .white
-            }
-        }
-    }
-
-    @objc public var label: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .label
-            } else {
-                return .black
-            }
-        }
-    }
-
-    @objc public var secondaryLabel: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .secondaryLabel
-            } else {
-                return UIColor(red: 0.24, green: 0.24, blue: 0.26, alpha: 0.6)
-            }
-        }
-    }
-
-    @objc public var separator: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .separator
-            } else {
-                return UIColor(red: 0.89, green: 0.89, blue: 0.89, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var opaqueSeparator: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .opaqueSeparator
-            } else {
-                return UIColor(red: 0.78, green: 0.78, blue: 0.78, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray
-            } else {
-                return UIColor(red: 0.56, green: 0.56, blue: 0.58, alpha: 1.0)
-            }
-        }
-    }
-
     @objc public var systemGray1: UIColor {
         get {
-            if #available(iOS 13, *) {
-                return UIColor(red: 0.60, green: 0.60, blue: 0.60, alpha: 1.0)
-            } else {
-                return UIColor(red: 0.60, green: 0.60, blue: 0.60, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray2: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray2
-            } else {
-                return UIColor(red: 0.68, green: 0.68, blue: 0.7, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray3: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray3
-            } else {
-                return UIColor(red: 0.78, green: 0.78, blue: 0.8, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray4: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray4
-            } else {
-                return UIColor(red: 0.82, green: 0.82, blue: 0.84, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray5: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray5
-            } else {
-                return UIColor(red: 0.9, green: 0.9, blue: 0.92, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemGray6: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemGray6
-            } else {
-                return UIColor(red: 0.95, green: 0.95, blue: 0.97, alpha: 1.0)
-            }
-        }
-    }
-
-    @objc public var systemFill: UIColor {
-        get {
-            if #available(iOS 13, *) {
-                return .systemFill
-            } else {
-                return UIColor(red: 120/255, green: 120/255, blue: 120/255, alpha: 1.0)
-            }
+            return UIColor(red: 0.60, green: 0.60, blue: 0.60, alpha: 1.0)
         }
     }
 
@@ -407,7 +197,7 @@ class NCBrandColor: NSObject {
 
         cacheImages.favorite = NCUtility.shared.loadImage(named: "star.fill", color: yellowFavorite)
         cacheImages.comment = UIImage(named: "comment")!.image(color: gray, size: 50)
-        cacheImages.livePhoto = NCUtility.shared.loadImage(named: "livephoto", color: label)
+        cacheImages.livePhoto = NCUtility.shared.loadImage(named: "livephoto", color: .label)
         cacheImages.offlineFlag = UIImage(named: "offlineFlag")!
         cacheImages.local = UIImage(named: "local")!
 

+ 1 - 1
iOSClient/BrowserWeb/NCBrowserWeb.swift

@@ -69,7 +69,7 @@ class NCBrowserWeb: UIViewController {
             loadWebPage(webView: webView!, url: url)
         }
 
-        // navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
+        // navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: .label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
     }
 
     override func viewWillAppear(_ animated: Bool) {

+ 11 - 11
iOSClient/Color/NCColorPicker.swift

@@ -41,7 +41,7 @@ class NCColorPicker: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        view.backgroundColor = .secondarySystemBackground
 
         if let metadata = metadata {
             let serverUrl = metadata.serverUrl + "/" + metadata.fileName
@@ -50,7 +50,7 @@ class NCColorPicker: UIViewController {
             }
         }
 
-        closeButton.setImage(NCUtility.shared.loadImage(named: "xmark", color: NCBrandColor.shared.label), for: .normal)
+        closeButton.setImage(NCUtility.shared.loadImage(named: "xmark", color: .label), for: .normal)
         titleLabel.text = NSLocalizedString("_select_color_", comment: "")
 
         orangeButton.backgroundColor = .orange
@@ -89,7 +89,7 @@ class NCColorPicker: UIViewController {
         yellowButton.layer.cornerRadius = 5
         yellowButton.layer.masksToBounds = true
 
-        systemBlueButton.backgroundColor = NCBrandColor.shared.systemBlue
+        systemBlueButton.backgroundColor = .systemBlue
         systemBlueButton.layer.cornerRadius = 5
         systemBlueButton.layer.masksToBounds = true
 
@@ -97,7 +97,7 @@ class NCColorPicker: UIViewController {
         systemMintButton.layer.cornerRadius = 5
         systemMintButton.layer.masksToBounds = true
 
-        systemPinkButton.backgroundColor = NCBrandColor.shared.systemPink
+        systemPinkButton.backgroundColor = .systemPink
         systemPinkButton.layer.cornerRadius = 5
         systemPinkButton.layer.masksToBounds = true
 
@@ -106,15 +106,15 @@ class NCColorPicker: UIViewController {
             if let selectedColor = selectedColor {
                 customButton.backgroundColor = selectedColor
             } else {
-                customButton.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+                customButton.backgroundColor = .secondarySystemBackground
             }
         } else {
-            customButton.backgroundColor = NCBrandColor.shared.systemTeal
+            customButton.backgroundColor = .systemTeal
         }
         customButton.layer.cornerRadius = 5
         customButton.layer.masksToBounds = true
 
-        systemIndigoButton.backgroundColor = NCBrandColor.shared.systemIndigo
+        systemIndigoButton.backgroundColor = .systemIndigo
         systemIndigoButton.layer.cornerRadius = 5
         systemIndigoButton.layer.masksToBounds = true
 
@@ -166,11 +166,11 @@ class NCColorPicker: UIViewController {
     }
 
     @IBAction func systemBlueButtonAction(_ sender: AnyObject) {
-        updateColor(hexColor: NCBrandColor.shared.systemBlue.hexString)
+        updateColor(hexColor: UIColor.systemBlue.hexString)
     }
 
     @IBAction func systemIndigoButtonAction(_ sender: AnyObject) {
-        updateColor(hexColor: NCBrandColor.shared.systemIndigo.hexString)
+        updateColor(hexColor: UIColor.systemIndigo.hexString)
     }
 
     @IBAction func systemMintButtonAction(_ sender: AnyObject) {
@@ -178,7 +178,7 @@ class NCColorPicker: UIViewController {
     }
 
     @IBAction func systemPinkButtonAction(_ sender: AnyObject) {
-        updateColor(hexColor: NCBrandColor.shared.systemPink.hexString)
+        updateColor(hexColor: UIColor.systemPink.hexString)
     }
 
     @IBAction func defaultButtonAction(_ sender: AnyObject) {
@@ -196,7 +196,7 @@ class NCColorPicker: UIViewController {
             }
             self.present(picker, animated: true, completion: nil)
         } else {
-            updateColor(hexColor: NCBrandColor.shared.systemTeal.hexString)
+            updateColor(hexColor: UIColor.systemTeal.hexString)
         }
     }
 

+ 25 - 25
iOSClient/Diagnostics/NCCapabilitiesViewController.swift

@@ -86,79 +86,79 @@ class NCCapabilitiesViewController: UIViewController, UIDocumentInteractionContr
 
         textView.layer.cornerRadius = 15
         textView.layer.masksToBounds = true
-        textView.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        textView.backgroundColor = .secondarySystemBackground
 
         statusFileSharing.layer.cornerRadius = 12.5
         statusFileSharing.layer.borderWidth = 0.5
-        statusFileSharing.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusFileSharing.layer.borderColor = UIColor.systemGray.cgColor
         statusFileSharing.layer.masksToBounds = true
-        statusFileSharing.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusFileSharing.backgroundColor = .secondarySystemBackground
 
         statusExternalSite.layer.cornerRadius = 12.5
         statusExternalSite.layer.borderWidth = 0.5
-        statusExternalSite.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusExternalSite.layer.borderColor = UIColor.systemGray.cgColor
         statusExternalSite.layer.masksToBounds = true
-        statusExternalSite.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusExternalSite.backgroundColor = .secondarySystemBackground
 
         statusEndToEndEncryption.layer.cornerRadius = 12.5
         statusEndToEndEncryption.layer.borderWidth = 0.5
-        statusEndToEndEncryption.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusEndToEndEncryption.layer.borderColor = UIColor.systemGray.cgColor
         statusEndToEndEncryption.layer.masksToBounds = true
-        statusEndToEndEncryption.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusEndToEndEncryption.backgroundColor = .secondarySystemBackground
 
         statusActivity.layer.cornerRadius = 12.5
         statusActivity.layer.borderWidth = 0.5
-        statusActivity.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusActivity.layer.borderColor = UIColor.systemGray.cgColor
         statusActivity.layer.masksToBounds = true
-        statusActivity.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusActivity.backgroundColor = .secondarySystemBackground
 
         statusNotification.layer.cornerRadius = 12.5
         statusNotification.layer.borderWidth = 0.5
-        statusNotification.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusNotification.layer.borderColor = UIColor.systemGray.cgColor
         statusNotification.layer.masksToBounds = true
-        statusNotification.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusNotification.backgroundColor = .secondarySystemBackground
 
         statusDeletedFiles.layer.cornerRadius = 12.5
         statusDeletedFiles.layer.borderWidth = 0.5
-        statusDeletedFiles.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusDeletedFiles.layer.borderColor = UIColor.systemGray.cgColor
         statusDeletedFiles.layer.masksToBounds = true
-        statusDeletedFiles.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusDeletedFiles.backgroundColor = .secondarySystemBackground
 
         statusText.layer.cornerRadius = 12.5
         statusText.layer.borderWidth = 0.5
-        statusText.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusText.layer.borderColor = UIColor.systemGray.cgColor
         statusText.layer.masksToBounds = true
-        statusText.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusText.backgroundColor = .secondarySystemBackground
 
         statusCollabora.layer.cornerRadius = 12.5
         statusCollabora.layer.borderWidth = 0.5
-        statusCollabora.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusCollabora.layer.borderColor = UIColor.systemGray.cgColor
         statusCollabora.layer.masksToBounds = true
-        statusCollabora.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusCollabora.backgroundColor = .secondarySystemBackground
 
         statusOnlyOffice.layer.cornerRadius = 12.5
         statusOnlyOffice.layer.borderWidth = 0.5
-        statusOnlyOffice.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusOnlyOffice.layer.borderColor = UIColor.systemGray.cgColor
         statusOnlyOffice.layer.masksToBounds = true
-        statusOnlyOffice.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusOnlyOffice.backgroundColor = .secondarySystemBackground
 
         statusUserStatus.layer.cornerRadius = 12.5
         statusUserStatus.layer.borderWidth = 0.5
-        statusUserStatus.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusUserStatus.layer.borderColor = UIColor.systemGray.cgColor
         statusUserStatus.layer.masksToBounds = true
-        statusUserStatus.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusUserStatus.backgroundColor = .secondarySystemBackground
 
         statusComments.layer.cornerRadius = 12.5
         statusComments.layer.borderWidth = 0.5
-        statusComments.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusComments.layer.borderColor = UIColor.systemGray.cgColor
         statusComments.layer.masksToBounds = true
-        statusComments.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusComments.backgroundColor = .secondarySystemBackground
 
         statusLockFile.layer.cornerRadius = 12.5
         statusLockFile.layer.borderWidth = 0.5
-        statusLockFile.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
+        statusLockFile.layer.borderColor = UIColor.systemGray.cgColor
         statusLockFile.layer.masksToBounds = true
-        statusLockFile.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        statusLockFile.backgroundColor = .secondarySystemBackground
 
         imageFileSharing.image = UIImage(named: "share")!.image(color: NCBrandColor.shared.gray, size: 50)
         imageExternalSite.image = NCUtility.shared.loadImage(named: "network", color: NCBrandColor.shared.gray)

+ 1 - 1
iOSClient/EmptyView/NCEmptyDataSet.swift

@@ -127,6 +127,6 @@ public class NCEmptyView: UIView {
     public override func awakeFromNib() {
         super.awakeFromNib()
 
-        emptyTitle.textColor = NCBrandColor.shared.label
+        emptyTitle.textColor = .label
     }
 }

+ 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
         }
     }
 }

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

@@ -138,13 +138,6 @@ extension UIImage {
         return newImage        
     }
 
-    func imageColor(_ color: UIColor) -> UIImage {
-        return UIGraphicsImageRenderer(size: size, format: imageRendererFormat).image { _ in
-            color.set()
-            withRenderingMode(.alwaysTemplate).draw(at: .zero)
-        }
-    }
-
     func isEqualToImage(image: UIImage?) -> Bool {
         if image == nil { return false }
         let data1: NSData = self.pngData()! as NSData
@@ -228,10 +221,10 @@ extension UIImage {
         var image = self
         if let tableDirectory = tableDirectory {
             if let hex = tableDirectory.colorFolder, let color = UIColor(hex: hex) {
-                image = self.imageColor(color)
+                image = self.withTintColor(color, renderingMode: .alwaysOriginal)
             }
         } else if let tableDirectory = NCManageDatabase.shared.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", metadata.account, serverUrl)), let hex = tableDirectory.colorFolder, let color = UIColor(hex: hex) {
-            image = self.imageColor(color)
+            image = self.withTintColor(color, renderingMode: .alwaysOriginal)
         }
         return image
     }

+ 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 {

+ 1 - 1
iOSClient/Login/NCLoginWeb.swift

@@ -60,7 +60,7 @@ class NCLoginWeb: UIViewController {
         }
 
         if accountCount > 0 {
-            navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "users")!.image(color: NCBrandColor.shared.label, size: 35), style: .plain, target: self, action: #selector(self.changeUser(sender:)))
+            navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "users")!.image(color: .label, size: 35), style: .plain, target: self, action: #selector(self.changeUser(sender:)))
         }
 
         let config = WKWebViewConfiguration()

+ 7 - 12
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -91,8 +91,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         collectionView.alwaysBounceVertical = true
 
         // Color
-        view.backgroundColor = NCBrandColor.shared.systemBackground
-        collectionView.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
+        collectionView.backgroundColor = .systemBackground
         refreshControl.tintColor = .gray
 
         if enableSearchBar {
@@ -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)
         }
     }
 
@@ -921,7 +919,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         openMenuItems(with: nil, gestureRecognizer: gestureRecognizer)
     }
 
-    @available(iOS 13.0, *)
     func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? {
 
         return UIContextMenuConfiguration(identifier: nil, previewProvider: {
@@ -1316,7 +1313,6 @@ extension NCCollectionViewCommon: UICollectionViewDelegate {
         navigationController?.pushViewController(viewController, animated: true)
     }
 
-    @available(iOS 13.0, *)
     func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
 
         guard let metadata = dataSource.cellForItemAt(indexPath: indexPath) else { return nil }
@@ -1341,7 +1337,6 @@ extension NCCollectionViewCommon: UICollectionViewDelegate {
         })
     }
 
-    @available(iOS 13.0, *)
     func collectionView(_ collectionView: UICollectionView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
 
         animator.addCompletion {
@@ -1653,7 +1648,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
         if appDelegate.isSearchingMode, let literalSearch = self.literalSearch, let title = cell.fileTitleLabel?.text {
             let longestWordRange = (title.lowercased() as NSString).range(of: literalSearch)
             let attributedString = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 15)])
-            attributedString.setAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor : NCBrandColor.shared.annotationColor], range: longestWordRange)
+            attributedString.setAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor : UIColor.systemBlue], range: longestWordRange)
             cell.fileTitleLabel?.attributedText = attributedString
         }
         return cell
@@ -1701,7 +1696,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 } else {
                     header.labelSection.text = self.dataSource.getSectionValueLocalization(indexPath: indexPath)
                 }
-                header.labelSection.textColor = NCBrandColor.shared.label
+                header.labelSection.textColor = .label
 
                 return header
 
@@ -1710,7 +1705,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionHeader", for: indexPath) as! NCSectionHeader
 
                 header.labelSection.text = self.dataSource.getSectionValueLocalization(indexPath: indexPath)
-                header.labelSection.textColor = NCBrandColor.shared.label
+                header.labelSection.textColor = .label
 
                 return header
             }

+ 2 - 2
iOSClient/Main/Collection Common/NCGridCell.swift

@@ -117,8 +117,8 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
 
         labelTitle.text = ""
         labelInfo.text = ""
-        labelTitle.textColor = NCBrandColor.shared.label
-        labelInfo.textColor = NCBrandColor.shared.systemGray
+        labelTitle.textColor = .label
+        labelInfo.textColor = .systemGray
     }
 
     override func prepareForReuse() {

+ 3 - 3
iOSClient/Main/Collection Common/NCListCell.swift

@@ -134,13 +134,13 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         longPressedGestureMore.delaysTouchesBegan = true
         buttonMore.addGestureRecognizer(longPressedGestureMore)
 
-        separator.backgroundColor = NCBrandColor.shared.separator
+        separator.backgroundColor = .separator
         separatorHeightConstraint.constant = 0.5
 
         labelTitle.text = ""
         labelInfo.text = ""
-        labelTitle.textColor = NCBrandColor.shared.label
-        labelInfo.textColor = NCBrandColor.shared.systemGray
+        labelTitle.textColor = .label
+        labelInfo.textColor = .systemGray
     }
 
     override func prepareForReuse() {

+ 12 - 12
iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift

@@ -44,7 +44,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
     let targetSizeImagePreview = CGSize(width: 100, height: 100)
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
 
-    var cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+    var cellBackgoundColor = UIColor.secondarySystemGroupedBackground
 
     // MARK: - View Life Cycle
 
@@ -79,9 +79,9 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
 
         self.title = NSLocalizedString("_upload_photos_videos_", comment: "")
 
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
+        cellBackgoundColor = .secondarySystemGroupedBackground
 
         self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
         self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
@@ -126,7 +126,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.cellConfig["imageView.image"] = UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: 25)
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -136,7 +136,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -151,7 +151,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.hidden = "$\("useFolderAutoUpload") == 0"
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -167,7 +167,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -179,7 +179,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -197,11 +197,11 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -214,7 +214,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
 
         row.cellConfig["textView.backgroundColor"] = cellBackgoundColor
         row.cellConfig["textView.font"] = UIFont.systemFont(ofSize: 14.0)
-        row.cellConfig["textView.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textView.textColor"] = UIColor.label
 
         section.addFormRow(row)
 

+ 7 - 7
iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift

@@ -79,10 +79,10 @@ extension NCCreateFormUploadConflictDelegate {
         tableView.allowsSelection = false
         tableView.tableFooterView = UIView()
 
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        viewSwitch.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        viewButton.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
+        viewSwitch.backgroundColor = .systemGroupedBackground
+        viewButton.backgroundColor = .systemGroupedBackground
 
         tableView.register(UINib(nibName: "NCCreateFormUploadConflictCell", bundle: nil), forCellReuseIdentifier: "Cell")
 
@@ -105,9 +105,9 @@ extension NCCreateFormUploadConflictDelegate {
         buttonCancel.layer.masksToBounds = true
         buttonCancel.layer.borderWidth = 0.5
         buttonCancel.layer.borderColor = UIColor.darkGray.cgColor
-        buttonCancel.backgroundColor = NCBrandColor.shared.systemGray5
+        buttonCancel.backgroundColor = .systemGray5
         buttonCancel.setTitle(NSLocalizedString("_cancel_", comment: ""), for: .normal)
-        buttonCancel.setTitleColor(NCBrandColor.shared.label, for: .normal)
+        buttonCancel.setTitleColor(.label, for: .normal)
 
         buttonContinue.layer.cornerRadius = 20
         buttonContinue.layer.masksToBounds = true
@@ -500,7 +500,7 @@ extension NCCreateFormUploadConflict: NCCreateFormUploadConflictCellDelegate {
 
         if result {
             buttonContinue.isEnabled = true
-            buttonContinue.setTitleColor(NCBrandColor.shared.label, for: .normal)
+            buttonContinue.setTitleColor(.label, for: .normal)
         } else {
             buttonContinue.isEnabled = false
             buttonContinue.setTitleColor(NCBrandColor.shared.gray, for: .normal)

+ 9 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

@@ -65,9 +65,9 @@ import XLForm
 
         self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
 
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        collectionView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        tableView.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
+        collectionView.backgroundColor = .systemGroupedBackground
+        tableView.backgroundColor = .secondarySystemGroupedBackground
 
         let cancelButton: UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
         let saveButton: UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
@@ -109,7 +109,7 @@ import XLForm
 
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -124,11 +124,11 @@ import XLForm
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -183,16 +183,16 @@ import XLForm
         // name
         let name = cell.viewWithTag(200) as! UILabel
         name.text = template.name
-        name.textColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        name.textColor = .secondarySystemGroupedBackground
 
         // select
         let imageSelect = cell.viewWithTag(300) as! UIImageView
         if selectTemplate != nil && selectTemplate?.name == template.name {
-            cell.backgroundColor = NCBrandColor.shared.label
+            cell.backgroundColor = .label
             imageSelect.image = UIImage(named: "plus100")
             imageSelect.isHidden = false
         } else {
-            cell.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+            cell.backgroundColor = .secondarySystemGroupedBackground
             imageSelect.isHidden = true
         }
 

+ 13 - 15
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -28,7 +28,6 @@ import VisionKit
 import Photos
 import XLForm
 
-@available(iOS 13.0, *)
 class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NCCreateFormUploadConflictDelegate {
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
@@ -47,7 +46,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
     var password: String = ""
     var fileType = "PDF"
 
-    var cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+    var cellBackgoundColor = UIColor.secondarySystemGroupedBackground
 
     // MARK: - View Life Cycle
 
@@ -71,14 +70,14 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
 
         self.title = NSLocalizedString("_save_settings_", comment: "")
 
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
+        cellBackgoundColor = .secondarySystemGroupedBackground
 
         let saveButton: UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
         self.navigationItem.rightBarButtonItem = saveButton
 
-        NCUtility.shared.colorNavigationController(navigationController, backgroundColor: NCBrandColor.shared.systemBackground, titleColor: NCBrandColor.shared.label, tintColor: nil, withoutShadow: false)
+        NCUtility.shared.colorNavigationController(navigationController, backgroundColor: .systemBackground, titleColor: .label, tintColor: nil, withoutShadow: false)
 
         tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
 
@@ -118,7 +117,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
 
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -140,7 +139,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
 
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.center.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -153,11 +152,11 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -173,7 +172,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         row.cellConfig["imageView.image"] = UIImage(named: "textRecognition")!.image(color: NCBrandColor.shared.brandElement, size: 25)
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -193,7 +192,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
 
         row.cellConfig["tintColor"] = NCBrandColor.shared.brandElement
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -202,11 +201,11 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -721,7 +720,6 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
 
 }
 
-@available(iOS 13.0, *)
 class NCCreateScanDocument: NSObject, VNDocumentCameraViewControllerDelegate {
     @objc static let shared: NCCreateScanDocument = {
         let instance = NCCreateScanDocument()

+ 9 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -43,7 +43,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
     private var audioPlayer: AVAudioPlayer!
     private var timer = Timer()
 
-    var cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+    var cellBackgoundColor = UIColor.secondarySystemGroupedBackground
 
     // MARK: - View Life Cycle
 
@@ -55,9 +55,9 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
 
         self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
 
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
-        cellBackgoundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
+        cellBackgoundColor = .secondarySystemGroupedBackground
 
         self.title = NSLocalizedString("_voice_memo_title_", comment: "")
 
@@ -69,8 +69,8 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         progressView.progressTintColor = .green
         progressView.trackTintColor = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
 
-        labelTimer.textColor = NCBrandColor.shared.label
-        labelDuration.textColor = NCBrandColor.shared.label
+        labelTimer.textColor = .label
+        labelDuration.textColor = .label
 
         initializeForm()
     }
@@ -135,7 +135,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
 
         row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -149,11 +149,11 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         row.cellConfig["backgroundColor"] = cellBackgoundColor
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         section.addFormRow(row)
 

+ 1 - 8
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:
@@ -587,7 +581,6 @@ import Photos
 
     // MARK: - Context Menu Configuration
 
-    @available(iOS 13.0, *)
     func contextMenuConfiguration(ocId: String, viewController: UIViewController, enableDeleteLocal: Bool, enableViewInFolder: Bool, image: UIImage?) -> UIMenu {
 
         guard let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) else {

+ 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: UIColor.label]
+        appearance.backgroundColor = .systemBackground
+        appearance.configureWithOpaqueBackground()
+        appearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
+        appearance.backgroundColor = .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
     }
 }

+ 2 - 2
iOSClient/Main/NCMainTabBar.swift

@@ -51,8 +51,8 @@ class NCMainTabBar: UITabBar {
 
         NotificationCenter.default.addObserver(self, selector: #selector(updateBadgeNumber(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUpdateBadgeNumber), object: nil)
 
-        barTintColor = NCBrandColor.shared.secondarySystemBackground
-        backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        barTintColor = .secondarySystemBackground
+        backgroundColor = .secondarySystemBackground
 
         changeTheming()
     }

+ 5 - 5
iOSClient/Main/Section Header Footer/NCSectionHeaderFooter.swift

@@ -101,14 +101,14 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         viewRichWorkspace?.addGestureRecognizer(tap)
 
         viewSeparatorHeightConstraint.constant = 0.5
-        viewSeparator.backgroundColor = NCBrandColor.shared.separator
+        viewSeparator.backgroundColor = .separator
 
-        markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.shared.label)
+        markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: .label)
         markdownParser.header.font = UIFont.systemFont(ofSize: 25)
         if let richWorkspaceText = richWorkspaceText {
             textViewRichWorkspace.attributedText = markdownParser.parse(richWorkspaceText)
         }
-        textViewColor = NCBrandColor.shared.label
+        textViewColor = .label
 
         labelSection.text = ""
         viewSectionHeightConstraint.constant = 0
@@ -334,12 +334,12 @@ class NCSectionFooter: UICollectionReusableView, NCSectionFooterDelegate {
         labelSection.textColor = NCBrandColor.shared.gray
         labelSection.text = ""
 
-        separator.backgroundColor = NCBrandColor.shared.separator
+        separator.backgroundColor = .separator
         separatorHeightConstraint.constant = 0.5
 
         buttonIsHidden(true)
         activityIndicatorSection.isHidden = true
-        activityIndicatorSection.color = NCBrandColor.shared.label
+        activityIndicatorSection.color = .label
     }
 
     func setTitleLabel(directories: Int, files: Int, size: Int64) {

+ 2 - 4
iOSClient/Media/NCMedia.swift

@@ -71,13 +71,13 @@ class NCMedia: UIViewController, NCEmptyDataSetDelegate, NCSelectDelegate {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
 
         collectionView.register(UINib(nibName: "NCGridMediaCell", bundle: nil), forCellWithReuseIdentifier: "gridCell")
 
         collectionView.alwaysBounceVertical = true
         collectionView.contentInset = UIEdgeInsets(top: insetsTop, left: 0, bottom: 50, right: 0)
-        collectionView.backgroundColor = NCBrandColor.shared.systemBackground
+        collectionView.backgroundColor = .systemBackground
 
         gridLayout = NCGridMediaLayout()
         gridLayout.itemForLine = CGFloat(min(CCUtility.getMediaWidthImage(), 5))
@@ -324,7 +324,6 @@ extension NCMedia: UICollectionViewDelegate {
         }
     }
 
-    @available(iOS 13.0, *)
     func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
 
         guard let cell = collectionView.cellForItem(at: indexPath) as? NCGridMediaCell else { return nil }
@@ -339,7 +338,6 @@ extension NCMedia: UICollectionViewDelegate {
         })
     }
 
-    @available(iOS 13.0, *)
     func collectionView(_ collectionView: UICollectionView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
         animator.addCompletion {
             if let indexPath = configuration.identifier as? IndexPath {

+ 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)
+                    }
                 )
-            }
+            )
         }
 
         //

+ 1 - 1
iOSClient/Menu/NCMenu+FloatingPanel.swift

@@ -72,7 +72,7 @@ class NCMenuPanelController: FloatingPanelController {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        self.surfaceView.backgroundColor = NCBrandColor.shared.systemBackground
+        self.surfaceView.backgroundColor = .systemBackground
         self.isRemovalInteractionEnabled = true
         self.backdropView.dismissalTapGestureRecognizer.isEnabled = true
         self.surfaceView.layer.cornerRadius = 16

+ 1 - 1
iOSClient/Menu/NCMenu.swift

@@ -72,7 +72,7 @@ class NCMenu: UITableViewController {
         let action = actions[indexPath.row]
         guard action.title != NCMenuAction.seperatorIdentifier else {
             let cell = UITableViewCell()
-            cell.backgroundColor = NCBrandColor.shared.separator
+            cell.backgroundColor = .separator
             return cell
         }
         let cell = tableView.dequeueReusableCell(withIdentifier: "menuActionCell", for: indexPath)

+ 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)
+                    }
                 )
-            }
+            )
         }
 
         //

+ 2 - 2
iOSClient/Menu/UIViewController+Menu.swift

@@ -77,11 +77,11 @@ extension UIViewController {
                 action: nil)
 
             let actions = card.actions.map { action -> NCMenuAction in
-                var image = NCUtility.shared.loadImage(named: "user", color: NCBrandColor.shared.label)
+                var image = NCUtility.shared.loadImage(named: "user", color: .label)
                 if let url = URL(string: action.icon),
                    let svgSource = SVGKSourceURL.source(from: url),
                    let svg = SVGKImage(source: svgSource) {
-                    image = svg.uiImage.imageColor(NCBrandColor.shared.label)
+                    image = svg.uiImage.withTintColor(.label, renderingMode: .alwaysOriginal)
                 }
                 return NCMenuAction(
                     title: action.title,

+ 15 - 17
iOSClient/More/NCMore.swift

@@ -48,11 +48,11 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         super.viewDidLoad()
 
         self.navigationItem.title = NSLocalizedString("_more_", comment: "")
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
 
         tableView.delegate = self
         tableView.dataSource = self
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
         tableView.register(UINib(nibName: "NCMoreUserCell", bundle: nil), forCellReuseIdentifier: "userCell")
 
         // create tap gesture recognizer
@@ -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)
@@ -336,10 +334,10 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                 } else {
                     cell.displayName?.text = account.displayName + " (" + account.alias + ")"
                 }
-                cell.displayName.textColor = NCBrandColor.shared.label
+                cell.displayName.textColor = .label
             }
             cell.selectedBackgroundView = selectionColor
-            cell.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+            cell.backgroundColor = .secondarySystemGroupedBackground
             cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
 
             if NCManageDatabase.shared.getCapabilitiesServerBool(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesUserStatusEnabled, exists: false) {
@@ -347,7 +345,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                     let status = NCUtility.shared.getUserStatus(userIcon: account.userStatusIcon, userStatus: account.userStatusStatus, userMessage: account.userStatusMessage)
                     cell.icon.image = status.onlineStatus
                     cell.status.text = status.statusMessage
-                    cell.status.textColor = NCBrandColor.shared.label
+                    cell.status.textColor = .label
                     cell.status.trailingBuffer = cell.status.frame.width
                     if cell.status.labelShouldScroll() {
                         cell.status.tapToScroll = true
@@ -381,13 +379,13 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
             cell.imageIcon?.image = NCUtility.shared.loadImage(named: item.icon)
             cell.labelText?.text = NSLocalizedString(item.name, comment: "")
-            cell.labelText.textColor = NCBrandColor.shared.label
+            cell.labelText.textColor = .label
 
             cell.selectedBackgroundView = selectionColor
-            cell.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+            cell.backgroundColor = .secondarySystemGroupedBackground
             cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
 
-            cell.separator.backgroundColor = NCBrandColor.shared.separator
+            cell.separator.backgroundColor = .separator
             cell.separatorHeigth.constant = 0.4
             
             cell.layer.cornerRadius = 0
@@ -495,7 +493,7 @@ class CCCellMore: UITableViewCell {
 
     override var frame: CGRect {
         get {
-            return super.bounds
+            return super.frame
         }
         set (newFrame) {
             var frame = newFrame
@@ -517,7 +515,7 @@ class NCMoreUserCell: UITableViewCell {
     
     override var frame: CGRect {
         get {
-            return super.bounds
+            return super.frame
         }
         set (newFrame) {
             var frame = newFrame

+ 0 - 1
iOSClient/More/NCMoreUserCell.xib

@@ -44,7 +44,6 @@
                         <nil key="highlightedColor"/>
                     </label>
                 </subviews>
-                <color key="tintColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 <constraints>
                     <constraint firstAttribute="trailing" secondItem="QNC-8X-DAC" secondAttribute="trailing" constant="20" id="28X-bj-Yak"/>
                     <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="5" secondAttribute="trailing" constant="15" id="DXv-dr-zaw"/>

+ 0 - 1
iOSClient/Networking/NCNetworking.swift

@@ -1407,7 +1407,6 @@ import Photos
 
     // MARK: - TEST API
 
-    @available(iOS 13.0, *)
     func getPreview(url: URL, options: NKRequestOptions = NKRequestOptions()) async throws -> Data? {
 
         try await withUnsafeThrowingContinuation { continuation in

+ 6 - 6
iOSClient/Notification/NCNotification.swift

@@ -38,13 +38,13 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
         super.viewDidLoad()
 
         title = NSLocalizedString("_notification_", comment: "")
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
 
         tableView.tableFooterView = UIView()
         tableView.rowHeight = UITableView.automaticDimension
         tableView.estimatedRowHeight = 50.0
         tableView.allowsSelection = false
-        tableView.backgroundColor = NCBrandColor.shared.systemBackground
+        tableView.backgroundColor = .systemBackground
 
         // Empty
         let offset = (self.navigationController?.navigationBar.bounds.height ?? 0) - 20
@@ -117,7 +117,7 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
         }
 
         if let image = image {
-            cell.icon.image = image.imageColor(NCBrandColor.shared.brandElement)
+            cell.icon.image = image.withTintColor(NCBrandColor.shared.brandElement, renderingMode: .alwaysOriginal)
         } else {
             cell.icon.image = NCUtility.shared.loadImage(named: "bell", color: NCBrandColor.shared.brandElement)
         }
@@ -147,7 +147,7 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
         cell.date.text = CCUtility.dateDiff(notification.date as Date)
         cell.date.textColor = .gray
         cell.subject.text = notification.subject
-        cell.subject.textColor = NCBrandColor.shared.label
+        cell.subject.textColor = .label
         cell.message.text = notification.message.replacingOccurrences(of: "<br />", with: "\n")
         cell.message.textColor = .gray
 
@@ -175,8 +175,8 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
         cell.secondary.layer.cornerRadius = 15
         cell.secondary.layer.masksToBounds = true
         cell.secondary.layer.borderWidth = 1
-        cell.secondary.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
-        cell.secondary.layer.backgroundColor = NCBrandColor.shared.secondarySystemBackground.cgColor
+        cell.secondary.layer.borderColor = UIColor.systemGray.cgColor
+        cell.secondary.layer.backgroundColor = UIColor.secondarySystemBackground.cgColor
         cell.secondary.setTitleColor(.black, for: .normal)
 
         // Action

+ 3 - 3
iOSClient/RichWorkspace/NCViewerRichWorkspace.swift

@@ -43,7 +43,7 @@ import MarkdownKit
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
         presentationController?.delegate = self
 
         let closeItem = UIBarButtonItem(title: NSLocalizedString("_back_", comment: ""), style: .plain, target: self, action: #selector(closeItemTapped(_:)))
@@ -52,10 +52,10 @@ import MarkdownKit
         let editItem = UIBarButtonItem(image: UIImage(named: "actionSheetModify"), style: UIBarButtonItem.Style.plain, target: self, action: #selector(editItemAction(_:)))
         self.navigationItem.rightBarButtonItem = editItem
 
-        markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.shared.label)
+        markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: .label)
         markdownParser.header.font = UIFont.systemFont(ofSize: 25)
         textView.attributedText = markdownParser.parse(richWorkspaceText)
-        textViewColor = NCBrandColor.shared.label
+        textViewColor = .label
     }
 
     override func viewWillAppear(_ animated: Bool) {

+ 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)

+ 0 - 3
iOSClient/ScanDocument/NCScan+CollectionView.swift

@@ -23,7 +23,6 @@
 
 import Foundation
 
-@available(iOS 13.0, *)
 extension NCScan: UICollectionViewDataSource {
 
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
@@ -89,7 +88,6 @@ extension NCScan: UICollectionViewDataSource {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCScan: UICollectionViewDragDelegate {
     func collectionView(_ collectionView: UICollectionView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
 
@@ -148,7 +146,6 @@ extension NCScan: UICollectionViewDragDelegate {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCScan: UICollectionViewDropDelegate {
 
     func collectionView(_ collectionView: UICollectionView, canHandle session: UIDropSession) -> Bool {

+ 9 - 11
iOSClient/ScanDocument/NCScan.swift

@@ -25,7 +25,6 @@ import UIKit
 import Photos
 import EasyTipView
 
-@available(iOS 13.0, *)
 class NCScan: UIViewController, NCScanCellCellDelegate {
 
     @IBOutlet weak var collectionViewSource: UICollectionView!
@@ -60,33 +59,33 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        view.backgroundColor = .secondarySystemGroupedBackground
         navigationItem.title = NSLocalizedString("_scanned_images_", comment: "")
 
         collectionViewSource.dragInteractionEnabled = true
         collectionViewSource.dragDelegate = self
         collectionViewSource.dropDelegate = self
-        collectionViewSource.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        collectionViewSource.backgroundColor = .secondarySystemGroupedBackground
 
         collectionViewDestination.dragInteractionEnabled = true
         collectionViewDestination.dropDelegate = self
         collectionViewDestination.dragDelegate = self
         collectionViewDestination.reorderingCadence = .fast // default value - .immediate
-        collectionViewDestination.backgroundColor = NCBrandColor.shared.secondarySystemGroupedBackground
+        collectionViewDestination.backgroundColor = .secondarySystemGroupedBackground
 
         cancel.title = NSLocalizedString("_cancel_", comment: "")
         save.title = NSLocalizedString("_save_", comment: "")
 
         labelTitlePDFzone.text = NSLocalizedString("_scan_label_document_zone_", comment: "")
-        labelTitlePDFzone.backgroundColor = NCBrandColor.shared.systemGray6
-        labelTitlePDFzone.textColor = NCBrandColor.shared.label
+        labelTitlePDFzone.backgroundColor = .systemGray6
+        labelTitlePDFzone.textColor = .label
 
         segmentControlFilter.setTitle(NSLocalizedString("_filter_original_", comment: ""), forSegmentAt: 0)
         segmentControlFilter.setTitle(NSLocalizedString("_filter_grayscale_", comment: ""), forSegmentAt: 1)
         segmentControlFilter.setTitle(NSLocalizedString("_filter_bn_", comment: ""), forSegmentAt: 2)
 
-        add.setImage(UIImage(named: "plus")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
-        transferDown.setImage(UIImage(named: "transferDown")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
+        add.setImage(UIImage(named: "plus")?.image(color: .label, size: 25), for: .normal)
+        transferDown.setImage(UIImage(named: "transferDown")?.image(color: .label, size: 25), for: .normal)
 
         let longPressRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPressGesture(recognizer:)))
         collectionViewSource.addGestureRecognizer(longPressRecognizer)
@@ -127,8 +126,8 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
 
-        add.setImage(UIImage(named: "plus")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
-        transferDown.setImage(UIImage(named: "transferDown")?.image(color: NCBrandColor.shared.label, size: 25), for: .normal)
+        add.setImage(UIImage(named: "plus")?.image(color: .label, size: 25), for: .normal)
+        transferDown.setImage(UIImage(named: "transferDown")?.image(color: .label, size: 25), for: .normal)
     }
 
     override var canBecomeFirstResponder: Bool { return true }
@@ -406,7 +405,6 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCScan: EasyTipViewDelegate {
 
     // TIP

+ 7 - 7
iOSClient/Select/NCSelect.swift

@@ -94,8 +94,8 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         self.navigationController?.navigationBar.prefersLargeTitles = true
         self.navigationController?.presentationController?.delegate = self
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
-        selectCommandViewSelect?.separatorView.backgroundColor = NCBrandColor.shared.separator
+        view.backgroundColor = .systemBackground
+        selectCommandViewSelect?.separatorView.backgroundColor = .separator
 
         activeAccount = NCManageDatabase.shared.getActiveAccount()
 
@@ -109,7 +109,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
         // Footer
         collectionView.register(UINib(nibName: "NCSectionFooter", bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "sectionFooter")
         collectionView.alwaysBounceVertical = true
-        collectionView.backgroundColor = NCBrandColor.shared.systemBackground
+        collectionView.backgroundColor = .systemBackground
 
         listLayout = NCListLayout()
         gridLayout = NCGridLayout()
@@ -419,7 +419,7 @@ extension NCSelect: UICollectionViewDataSource {
             cell.fileObjectId = metadata.ocId
             cell.fileUser = metadata.ownerId
             cell.labelTitle.text = metadata.fileNameView
-            cell.labelTitle.textColor = NCBrandColor.shared.label
+            cell.labelTitle.textColor = .label
 
             cell.imageSelect.image = nil
             cell.imageStatus.image = nil
@@ -515,7 +515,7 @@ extension NCSelect: UICollectionViewDataSource {
             cell.fileObjectId = metadata.ocId
             cell.fileUser = metadata.ownerId
             cell.labelTitle.text = metadata.fileNameView
-            cell.labelTitle.textColor = NCBrandColor.shared.label
+            cell.labelTitle.textColor = .label
 
             cell.imageSelect.image = nil
             cell.imageStatus.image = nil
@@ -613,7 +613,7 @@ extension NCSelect: UICollectionViewDataSource {
                 } else {
                     header.labelSection.text = self.dataSource.getSectionValueLocalization(indexPath: indexPath)
                 }
-                header.labelSection.textColor = NCBrandColor.shared.label
+                header.labelSection.textColor = .label
 
                 return header
 
@@ -785,7 +785,7 @@ class NCSelectCommandView: UIView {
     override func awakeFromNib() {
 
         separatorHeightConstraint.constant = 0.5
-        separatorView.backgroundColor = NCBrandColor.shared.separator
+        separatorView.backgroundColor = .separator
 
         overwriteLabel?.text = NSLocalizedString("_overwrite_", comment: "")
 

+ 29 - 29
iOSClient/Settings/CCAdvanced.m

@@ -47,11 +47,11 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"showHiddenFiles" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_show_hidden_files_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     if ([CCUtility getShowHiddenFiles]) row.value = @"1";
     else row.value = @"0";
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Format Compatibility + Live Photo + Delete asset
@@ -61,27 +61,27 @@
     section.footerTitle = [NSString stringWithFormat:@"%@\n%@\n%@", NSLocalizedString(@"_format_compatibility_footer_", nil), NSLocalizedString(@"_upload_mov_livephoto_footer_", nil), NSLocalizedString(@"_remove_photo_CameraRoll_desc_", nil)];
 
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"formatCompatibility" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_format_compatibility_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     if ([CCUtility getFormatCompatibility]) row.value = @"1";
     else row.value = @"0";
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"livePhoto" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_upload_mov_livephoto_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     if ([CCUtility getLivePhoto]) row.value = @"1";
     else row.value = @"0";
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
 
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"removePhotoCameraRoll" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_remove_photo_CameraRoll_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     if ([CCUtility getRemovePhotoCameraRoll]) row.value = @"1";
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Section : Files App --------------------------------------------------------------
@@ -94,11 +94,11 @@
 
         // Disable Files App
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"disablefilesapp" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_disable_files_app_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         if ([CCUtility getDisableFilesApp]) row.value = @"1";
         else row.value = @"0";
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [section addFormRow:row];
     }
     
@@ -109,10 +109,10 @@
     section.footerTitle = NSLocalizedString(@"_chunk_footer_title_", nil);
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"chunk" rowType:XLFormRowDescriptorTypeStepCounter title:NSLocalizedString(@"_chunk_size_mb_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.value = [NSString stringWithFormat:@"%ld", CCUtility.getChunkSize];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfigAtConfigure setObject:@YES forKey:@"stepControl.wraps"];
     [row.cellConfigAtConfigure setObject:@1 forKey:@"stepControl.stepValue"];
     [row.cellConfigAtConfigure setObject:@0 forKey:@"stepControl.minimumValue"];
@@ -128,9 +128,9 @@
         section.footerTitle = NSLocalizedString(@"_privacy_footer_", nil);
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"crashservice" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_crashservice_title_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"crashservice"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         if ([CCUtility getDisableCrashservice]) row.value = @"1";
         else row.value = @"0";
@@ -145,9 +145,9 @@
     if ([[NSFileManager defaultManager] fileExistsAtPath:NKCommon.shared.filenamePathLog] && NCBrandOptions.shared.disable_log == false) {
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"log" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_view_log_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"log"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.action.formBlock = ^(XLFormRowDescriptor * sender) {
@@ -159,9 +159,9 @@
         [section addFormRow:row];
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"clearlog" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_clear_log_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"clear"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.action.formBlock = ^(XLFormRowDescriptor * sender) {
@@ -182,9 +182,9 @@
         [section addFormRow:row];
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"logLevel" rowType:XLFormRowDescriptorTypeSlider title:NSLocalizedString(@"_level_log_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:@(NSTextAlignmentCenter) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         NSInteger logLevel = [CCUtility getLogLevel];
         row.value = @(logLevel);
@@ -195,9 +195,9 @@
     }
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"capabilities" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_capabilities_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"capabilities"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.formBlock = ^(XLFormRowDescriptor * sender) {
@@ -245,8 +245,8 @@
     }
     
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.selectorTitle = NSLocalizedString(@"_delete_old_files_", nil);
     row.selectorOptions = @[[XLFormOptionsObject formOptionsObjectWithValue:@(0) displayText:NSLocalizedString(@"_never_", nil)],
                             [XLFormOptionsObject formOptionsObjectWithValue:@(365) displayText:NSLocalizedString(@"_1_year_", nil)],
@@ -260,9 +260,9 @@
     
     // Clear cache
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"azzeracache" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_clear_cache_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"trash"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.formSelector = @selector(clearCacheRequest:);
@@ -276,7 +276,7 @@
     
     // Exit
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"esci" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_exit_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     [row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
@@ -296,9 +296,9 @@
         
     self.title = NSLocalizedString(@"_advanced_", nil);
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-    self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
-    self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
     [self initializeForm];
     [self calculateSize];

+ 54 - 59
iOSClient/Settings/CCManageAccount.m

@@ -58,7 +58,7 @@
         // Avatar
         UIImage *avatar = [[NCUtility shared] loadUserImageFor:account.user displayName:account.displayName userBaseUrl:account];
         
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:13.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:avatar forKey:@"imageView.image"];
         if (account.active) {
@@ -74,10 +74,10 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"alias" rowType:XLFormRowDescriptorTypeText];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[[UIImage imageNamed:@"form-textbox"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textField.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textField.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textField.textColor"];
     row.value = activeAccount.alias;
     [section addFormRow:row];
     
@@ -92,38 +92,37 @@
             
             // New Account nextcloud
             row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccount" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_account_", nil)];
-            row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+            row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
             [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
             [row.cellConfig setObject:[[UIImage imageNamed:@"plus"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
             [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-            [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+            [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
             row.action.formSelector = @selector(addAccount:);
             [section addFormRow:row];
         }
         
         // Set user status
-        if (@available(iOS 13.0, *)) {
-            BOOL userStatus = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:activeAccount.account elements:NCElementsJSON.shared.capabilitiesUserStatusEnabled exists:false];
-            if (userStatus) {
-                row = [XLFormRowDescriptor formRowDescriptorWithTag:@"setUserStatus" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_set_user_status_", nil)];
-                row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
-                [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
-                [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-                [row.cellConfig setObject:[[UIImage imageNamed:@"userStatusAway"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
-                [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-                row.action.formSelector = @selector(setUserStatus:);
-                if (accounts.count == 0) row.disabled = @YES;
-                [section addFormRow:row];
-            }
+        
+        BOOL userStatus = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:activeAccount.account elements:NCElementsJSON.shared.capabilitiesUserStatusEnabled exists:false];
+        if (userStatus) {
+            row = [XLFormRowDescriptor formRowDescriptorWithTag:@"setUserStatus" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_set_user_status_", nil)];
+            row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
+            [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
+            [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
+            [row.cellConfig setObject:[[UIImage imageNamed:@"userStatusAway"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
+            [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
+            row.action.formSelector = @selector(setUserStatus:);
+            if (accounts.count == 0) row.disabled = @YES;
+            [section addFormRow:row];
         }
         
         if ([NCBrandOptions shared].disable_multiaccount == NO) {
             
             row = [XLFormRowDescriptor formRowDescriptorWithTag:@"accountRequest" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_settings_account_request_", nil)];
-            row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+            row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
             [row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
             [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-            [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+            [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
             if ([CCUtility getAccountRequest]) row.value = @1;
             else row.value = @0;
             [section addFormRow:row];
@@ -136,20 +135,20 @@
     [form addFormSection:section];
 
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"certificateDetails" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_certificate_details_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     row.action.formSelector = @selector(certificateDetails:);
     [section addFormRow:row];
         
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"certificatePNDetails" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_certificate_pn_details_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     row.action.formSelector = @selector(certificatePNDetails:);
     [section addFormRow:row];
     
@@ -161,9 +160,9 @@
     // Full Name
     if ([activeAccount.displayName length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userfullname" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_full_name_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"user"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.displayName;
@@ -173,10 +172,10 @@
     // Address
     if ([activeAccount.address length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useraddress" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_address_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"address"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.address;
         [section addFormRow:row];
@@ -185,10 +184,10 @@
     // City + zip
     if ([activeAccount.city length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercity" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_city_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"city"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.city;
         if ([activeAccount.zip length] > 0) {
@@ -200,10 +199,10 @@
     // Country
     if ([activeAccount.country length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercountry" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_country_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"country"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = [[NSLocale systemLocale] displayNameForKey:NSLocaleCountryCode value:activeAccount.country];
         //NSArray *countryCodes = [NSLocale ISOCountryCodes];
@@ -213,10 +212,10 @@
     // Phone
     if ([activeAccount.phone length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userphone" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_phone_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"phone"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.phone;
         [section addFormRow:row];
@@ -225,10 +224,10 @@
     // Email
     if ([activeAccount.email length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useremail" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_email_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"email"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.email;
         [section addFormRow:row];
@@ -237,10 +236,10 @@
     // Web
     if ([activeAccount.website length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userweb" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_web_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"network"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.website;
         [section addFormRow:row];
@@ -249,10 +248,10 @@
     // Twitter
     if ([activeAccount.twitter length] > 0) {
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usertwitter" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_twitter_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"twitter"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.twitter;
         [section addFormRow:row];
@@ -267,30 +266,30 @@
         
         // Business Type
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userbusinesstype" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_businesstype_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"businesstype"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.businessType;
         [section addFormRow:row];
         
         // Business Size
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userbusinesssize" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_businesssize_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.businessSize;
         [section addFormRow:row];
         
         // Role
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userrole" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_role_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"role"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         if ([activeAccount.role isEqualToString:@"owner"]) row.value = NSLocalizedString(@"_user_owner_", nil);
         else if ([activeAccount.role isEqualToString:@"employee"]) row.value = NSLocalizedString(@"_user_employee_", nil);
@@ -300,10 +299,10 @@
         
         // Company
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercompany" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_company_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"company"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.value = activeAccount.organisation;
         [section addFormRow:row];
@@ -314,7 +313,7 @@
             [form addFormSection:section];
             
             row = [XLFormRowDescriptor formRowDescriptorWithTag:@"trial" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_trial_expired_day_", nil)];
-            row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+            row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
             [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
             [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
             [row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
@@ -330,11 +329,11 @@
         
         // Edit profile
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"editUserProfile" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_user_editprofile_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"editUserProfile"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
 #if defined(HC)
         row.action.viewControllerClass = [HCEditProfile class];
 #endif
@@ -359,9 +358,9 @@
     
     self.title = NSLocalizedString(@"_credentials_", nil);
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-    self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
-    self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initialize) name:NCGlobal.shared.notificationCenterInitialize object:nil];
     
@@ -488,12 +487,8 @@
 {
     [self deselectFormRow:sender];
     
-    if (@available(iOS 13.0, *)) {
-        
-        UINavigationController *navigationController = [[UIStoryboard storyboardWithName:@"NCUserStatus" bundle:nil] instantiateInitialViewController];
-        
-        [self presentViewController:navigationController animated:YES completion:nil];
-    }
+    UINavigationController *navigationController = [[UIStoryboard storyboardWithName:@"NCUserStatus" bundle:nil] instantiateInitialViewController];
+    [self presentViewController:navigationController animated:YES completion:nil];
 }
 
 #pragma mark -

+ 20 - 20
iOSClient/Settings/CCManageAutoUpload.m

@@ -49,11 +49,11 @@
     section.footerTitle = NSLocalizedString(@"_autoupload_description_", nil);
 
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_autoupload_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     if (activeAccount.autoUpload) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
 
     // Auto Upload Directory
@@ -62,11 +62,11 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadDirectory" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_autoupload_select_folder_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"foldersOnTop"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     //[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
     row.action.formSelector = @selector(selectAutomaticUploadFolder);
@@ -78,21 +78,21 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadImage" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_autoupload_photos_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     if (activeAccount.autoUploadImage) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
 
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadWWAnPhoto" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_wifi_only_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     if (activeAccount.autoUploadWWAnPhoto) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Auto Upload Video
@@ -101,21 +101,21 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadVideo" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_autoupload_videos_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     if (activeAccount.autoUploadVideo) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadWWAnVideo" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_wifi_only_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     if (activeAccount.autoUploadWWAnVideo) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Auto Upload Full
@@ -124,13 +124,13 @@
     
     NSString *title = NSLocalizedString(@"_autoupload_fullphotos_", nil);
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadFull" rowType:XLFormRowDescriptorTypeBooleanSwitch title:title];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     row.value = 0;
     if (activeAccount.autoUploadFull) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Auto Upload create subfolder
@@ -139,12 +139,12 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadCreateSubfolder" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_autoupload_create_subfolder_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     row.hidden = [NSString stringWithFormat:@"$%@==0", @"autoUpload"];
     if (activeAccount.autoUploadCreateSubfolder) row.value = @1;
     else row.value = @0;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Auto Upload file name
@@ -153,9 +153,9 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUploadFileName" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_autoupload_filenamemask_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     row.action.viewControllerClass = [NCManageAutoUploadFileName class];
     [section addFormRow:row];
     
@@ -176,9 +176,9 @@
     
     self.title = NSLocalizedString(@"_settings_autoupload_", nil);
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-    self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
-    self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initialize) name:NCGlobal.shared.notificationCenterInitialize object:nil];
     

+ 12 - 12
iOSClient/Settings/NCManageAutoUploadFileName.swift

@@ -47,10 +47,10 @@ class NCManageAutoUploadFileName: XLFormViewController {
 
         row = XLFormRowDescriptor(tag: "maintainOriginalFileName", rowType: XLFormRowDescriptorTypeBooleanSwitch, title: NSLocalizedString("_maintain_original_filename_", comment: ""))
         row.value = CCUtility.getOriginalFileName(NCGlobal.shared.keyFileNameOriginalAutoUpload)
-        row.cellConfig["backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground
+        row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -59,10 +59,10 @@ class NCManageAutoUploadFileName: XLFormViewController {
         row = XLFormRowDescriptor(tag: "addFileNameType", rowType: XLFormRowDescriptorTypeBooleanSwitch, title: NSLocalizedString("_add_filenametype_", comment: ""))
         row.value = CCUtility.getFileNameType(NCGlobal.shared.keyFileNameAutoUploadType)
         row.hidden = "$\("maintainOriginalFileName") == 1"
-        row.cellConfig["backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground
+        row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -77,14 +77,14 @@ class NCManageAutoUploadFileName: XLFormViewController {
             row.value = fileNameMask
         }
         row.hidden = "$\("maintainOriginalFileName") == 1"
-        row.cellConfig["backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground
+        row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground
 
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textLabel.textColor"] = UIColor.label
 
         row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
         row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
-        row.cellConfig["textField.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textField.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -93,11 +93,11 @@ class NCManageAutoUploadFileName: XLFormViewController {
         row = XLFormRowDescriptor(tag: "previewFileName", rowType: XLFormRowDescriptorTypeTextView, title: "")
         row.height = 180
         row.disabled = true
-        row.cellConfig["backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground
+        row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground
 
-        row.cellConfig["textView.backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground
+        row.cellConfig["textView.backgroundColor"] = UIColor.secondarySystemGroupedBackground
         row.cellConfig["textView.font"] = UIFont.systemFont(ofSize: 14.0)
-        row.cellConfig["textView.textColor"] = NCBrandColor.shared.label
+        row.cellConfig["textView.textColor"] = UIColor.label
 
         section.addFormRow(row)
 
@@ -111,9 +111,9 @@ class NCManageAutoUploadFileName: XLFormViewController {
         super.viewDidLoad()
 
         self.title = NSLocalizedString("_mode_filename_", comment: "")
-        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        view.backgroundColor = .systemGroupedBackground
 
-        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        tableView.backgroundColor = .systemGroupedBackground
 
         initializeForm()
         reloadForm()

+ 16 - 16
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -63,10 +63,10 @@
         [form addFormSection:section];
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"serviceActivated" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_e2e_settings_not_available_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[[UIImage imageNamed:@"closeCircle"] imageWithColor:[UIColor redColor] size:25] forKey:@"imageView.image"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         [section addFormRow:row];
         
@@ -85,10 +85,10 @@
         [form addFormSection:section];
         
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"serviceActivated" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_e2e_settings_activated_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[[UIImage imageNamed:@"checkmark.circle.fill"] imageWithColor:[UIColor greenColor] size:25] forKey:@"imageView.image"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         [section addFormRow:row];
         
@@ -99,10 +99,10 @@
         
         // Read Passphrase
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"readPassphrase" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_e2e_settings_read_passphrase_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[[UIImage imageNamed:@"e2eReadPassphrase"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         row.action.formSelector = @selector(readPassphrase:);
         [section addFormRow:row];
@@ -114,10 +114,10 @@
         
         // remove locally Encryption
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"removeLocallyEncryption" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_e2e_settings_remove_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         row.action.formSelector = @selector(removeLocallyEncryption:);
         [section addFormRow:row];
@@ -131,9 +131,9 @@
     
         // Start e2e
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"startE2E" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_e2e_settings_start_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
         row.action.formSelector = @selector(startE2E:);
         [section addFormRow:row];   
@@ -147,18 +147,18 @@
     
     // Delete publicKey
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"deleteCertificate" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"Delete certificate", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     row.action.formSelector = @selector(deleteCertificate:);
     [section addFormRow:row];
     
     // Delete privateKey
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"deletePrivateKey" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"Delete PrivateKey", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     row.action.formSelector = @selector(deletePrivateKey:);
     [section addFormRow:row];
@@ -176,9 +176,9 @@
     
     self.title = NSLocalizedString(@"_e2e_settings_", nil);
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-    self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
     
-    self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
         
     // E2EE
     self.endToEndInitialize = [NCEndToEndInitialize new];

+ 22 - 22
iOSClient/Settings/NCSettings.m

@@ -59,9 +59,9 @@
     [form addFormSection:section];
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_settings_autoupload_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"autoUpload"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.viewControllerClass = [CCManageAutoUpload class];
     [section addFormRow:row];
@@ -73,31 +73,31 @@
     
     // Lock active YES/NO
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"bloccopasscode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_lock_not_active_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[[UIImage imageNamed:@"lock_open"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
     //[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
     row.action.formSelector = @selector(passcode:);
     [section addFormRow:row];
     // Enable Touch ID
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"enableTouchDaceID" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_enable_touch_face_id_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     // Lock no screen
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"notPasscodeAtStart" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_no_screen_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     // Privacy screen
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"privacyScreen" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_privacy_screen_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
     // Section : E2EEncryption --------------------------------------------------------------
@@ -108,9 +108,9 @@
     // EndToEnd Encryption
     NSString *title = [NSString stringWithFormat:@"%@",NSLocalizedString(@"_e2e_settings_", nil)];
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"e2eEncryption" rowType:XLFormRowDescriptorTypeButton title:title];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.viewControllerClass = [NCManageEndToEndEncryption class];
     
@@ -123,9 +123,9 @@
     
     // Advanced
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"advanced" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_advanced_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"gear"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.viewControllerClass = [CCAdvanced class];
     [section addFormRow:row];
@@ -137,10 +137,10 @@
     
     // Acknowledgements
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+    row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+    [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
     [row.cellConfig setObject:[[UIImage imageNamed:@"acknowledgements"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
     row.action.formBlock = ^(XLFormRowDescriptor * sender){
         [self performSegueWithIdentifier:@"AcknowledgementsSegue" sender:sender];
@@ -152,20 +152,20 @@
         
         // Privacy and Legal Policy
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"privacy" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_privacy_legal_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"shield.checkerboard"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.action.formSelector = @selector(privacy:);
         [section addFormRow:row];
         
         // Source code
         row = [XLFormRowDescriptor formRowDescriptorWithTag:@"sourcecode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_source_code_", nil)];
-        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
+        row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
         [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
         [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-        [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
+        [row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
         [row.cellConfig setObject:[[UIImage imageNamed:@"gitHub"] imageWithColor:NCBrandColor.shared.gray size:25] forKey:@"imageView.image"];
         row.action.formSelector = @selector(sourceCode:);
         [section addFormRow:row];
@@ -183,8 +183,8 @@
     [super viewDidLoad];
     
     self.title = NSLocalizedString(@"_settings_", nil);
-    self.view.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
-    self.tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground;
+    self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
+    self.tableView.backgroundColor = UIColor.systemGroupedBackgroundColor;
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground) name:NCGlobal.shared.notificationCenterApplicationDidEnterBackground object: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() {

+ 2 - 2
iOSClient/Share/Advanced/NCShareAdvancePermissionFooter.swift

@@ -41,8 +41,8 @@ class NCShareAdvancePermissionFooter: UIView {
         buttonCancel.layer.cornerRadius = 25
         buttonCancel.layer.masksToBounds = true
         buttonCancel.layer.borderWidth = 1
-        buttonCancel.layer.borderColor = NCBrandColor.shared.systemGray.cgColor
-        buttonCancel.backgroundColor = NCBrandColor.shared.secondarySystemBackground
+        buttonCancel.layer.borderColor = UIColor.systemGray.cgColor
+        buttonCancel.backgroundColor = .secondarySystemBackground
         buttonCancel.addTarget(self, action: #selector(cancelClicked), for: .touchUpInside)
         buttonCancel.setTitleColor(.black, for: .normal)
 

+ 2 - 2
iOSClient/Share/Advanced/NCShareAdvancePermissionHeader.swift

@@ -44,8 +44,8 @@ class NCShareAdvancePermissionHeader: UIView {
             }
         }
         fileName.text = metadata.fileNameView
-        fileName.textColor = NCBrandColor.shared.label
-        info.textColor = NCBrandColor.shared.secondaryLabel
+        fileName.textColor = .label
+        info.textColor = .secondaryLabel
         info.text = CCUtility.transformedSize(metadata.size) + ", " + CCUtility.dateDiff(metadata.date as Date)
     }
 }

+ 4 - 4
iOSClient/Share/NCShare.swift

@@ -64,7 +64,7 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
 
         viewContainerConstraint.constant = height
         searchFieldTopConstraint.constant = 10
@@ -74,7 +74,7 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
         tableView.dataSource = self
         tableView.delegate = self
         tableView.allowsSelection = false
-        tableView.backgroundColor = NCBrandColor.shared.systemBackground
+        tableView.backgroundColor = .systemBackground
 
         tableView.register(UINib(nibName: "NCShareLinkCell", bundle: nil), forCellReuseIdentifier: "cellLink")
         tableView.register(UINib(nibName: "NCShareUserCell", bundle: nil), forCellReuseIdentifier: "cellUser")
@@ -136,7 +136,7 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
             sharedWithYouByNoteImage.image = NCUtility.shared.loadImage(named: "note.text", color: .gray)
             sharedWithYouByNote.isHidden = false
             sharedWithYouByNote.text = metadata.note
-            sharedWithYouByNote.textColor = NCBrandColor.shared.label
+            sharedWithYouByNote.textColor = .label
             sharedWithYouByNote.trailingBuffer = sharedWithYouByNote.frame.width
         } else {
             sharedWithYouByNoteImage.isHidden = true
@@ -223,7 +223,7 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
         dropDown = DropDown()
         let appearance = DropDown.appearance()
 
-        appearance.backgroundColor = NCBrandColor.shared.systemBackground
+        appearance.backgroundColor = .systemBackground
         appearance.cornerRadius = 10
         appearance.shadowColor = UIColor(white: 0.5, alpha: 1)
         appearance.shadowOpacity = 0.9

+ 11 - 11
iOSClient/Share/NCShareCommon.swift

@@ -75,27 +75,27 @@ class NCShareCommon: NSObject {
 
         switch shareType {
         case SHARE_TYPE_USER:
-            return UIImage(named: "shareTypeUser")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeUser")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_GROUP:
-            return UIImage(named: "shareTypeGroup")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeGroup")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_LINK:
-            return UIImage(named: "shareTypeLink")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeLink")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_EMAIL:
-            return UIImage(named: "shareTypeEmail")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeEmail")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_CONTACT:
-            return UIImage(named: "shareTypeUser")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeUser")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_REMOTE:
-            return UIImage(named: "shareTypeUser")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeUser")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_CIRCLE:
-            return UIImage(named: "shareTypeCircles")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeCircles")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_GUEST:
-            return UIImage(named: "shareTypeUser")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeUser")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_REMOTE_GROUP:
-            return UIImage(named: "shareTypeGroup")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeGroup")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         case self.SHARE_TYPE_ROOM:
-            return UIImage(named: "shareTypeRoom")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeRoom")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         default:
-            return UIImage(named: "shareTypeUser")?.imageColor(NCBrandColor.shared.label)
+            return UIImage(named: "shareTypeUser")?.withTintColor(.label, renderingMode: .alwaysOriginal)
         }
     }
 }

+ 1 - 1
iOSClient/Share/NCShareLinkCell.swift

@@ -73,7 +73,7 @@ class NCShareLinkCell: UITableViewCell {
             menuButton.setImage(UIImage(named: menuImageName)?.image(color: .gray, size: 50), for: .normal)
         }
 
-        labelTitle.textColor = NCBrandColor.shared.label
+        labelTitle.textColor = .label
         imageItem.image = NCShareCommon.shared.createLinkAvatar(imageName: imageName, colorCircle: imageBGColor)
         copyButton.setImage(UIImage(named: "shareCopy")?.image(color: .gray, size: 50), for: .normal)
     }

+ 10 - 10
iOSClient/Share/NCSharePaging.swift

@@ -49,7 +49,7 @@ class NCSharePaging: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
 
         navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_close_", comment: ""), style: .done, target: self, action: #selector(exitTapped))
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
@@ -61,11 +61,11 @@ class NCSharePaging: UIViewController {
         pagingViewController.activityEnabled = activityEnabled
         pagingViewController.commentsEnabled = commentsEnabled
         pagingViewController.sharingEnabled = sharingEnabled
-        pagingViewController.backgroundColor = NCBrandColor.shared.systemBackground
-        pagingViewController.menuBackgroundColor = NCBrandColor.shared.systemBackground
-        pagingViewController.selectedBackgroundColor = NCBrandColor.shared.systemBackground
-        pagingViewController.textColor = NCBrandColor.shared.label
-        pagingViewController.selectedTextColor = NCBrandColor.shared.label
+        pagingViewController.backgroundColor = .systemBackground
+        pagingViewController.menuBackgroundColor = .systemBackground
+        pagingViewController.selectedBackgroundColor = .systemBackground
+        pagingViewController.textColor = .label
+        pagingViewController.selectedTextColor = .label
 
         // Pagination
         addChild(pagingViewController)
@@ -306,7 +306,7 @@ class NCSharePagingView: PagingView {
     override func setupConstraints() {
 
         guard let headerView = Bundle.main.loadNibNamed("NCShareHeaderView", owner: self, options: nil)?.first as? NCShareHeaderView else { return }
-        headerView.backgroundColor = NCBrandColor.shared.systemBackground
+        headerView.backgroundColor = .systemBackground
         headerView.ocId = metadata.ocId
 
         if FileManager.default.fileExists(atPath: CCUtility.getDirectoryProviderStorageIconOcId(metadata.ocId, etag: metadata.etag)) {
@@ -323,12 +323,12 @@ class NCSharePagingView: PagingView {
             }
         }
         headerView.path.text = NCUtilityFileSystem.shared.getPath(path: metadata.path, user: metadata.user, fileName: metadata.fileName)
-        headerView.path.textColor = NCBrandColor.shared.label
+        headerView.path.textColor = .label
         headerView.path.trailingBuffer = headerView.path.frame.width
         if metadata.favorite {
             headerView.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite, size: 20), for: .normal)
         } else {
-            headerView.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.systemGray, size: 20), for: .normal)
+            headerView.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: .systemGray, size: 20), for: .normal)
         }
         headerView.info.text = CCUtility.transformedSize(metadata.size) + ", " + CCUtility.dateDiff(metadata.date as Date)
         addSubview(headerView)
@@ -378,7 +378,7 @@ class NCShareHeaderView: UIView {
             if error == .success {
                 self.favorite.setImage(NCUtility.shared.loadImage(
                     named: "star.fill",
-                    color: metadata.favorite ? NCBrandColor.shared.yellowFavorite : NCBrandColor.shared.systemGray,
+                    color: metadata.favorite ? NCBrandColor.shared.yellowFavorite : .systemGray,
                     size: 20), for: .normal)
             } else {
                 NCContentPresenter.shared.showError(error: error)

+ 1 - 1
iOSClient/Share/NCShareUserCell.swift

@@ -56,7 +56,7 @@ class NCShareUserCell: UITableViewCell, NCCellProtocol {
             selector: #selector(tapAvatarImage))]
 
         labelTitle.text = tableShare.shareWithDisplayname
-        labelTitle.textColor = NCBrandColor.shared.label
+        labelTitle.textColor = .label
         isUserInteractionEnabled = true
         labelQuickStatus.isHidden = false
         imageDownArrow.isHidden = false

+ 1 - 1
iOSClient/Transfers/NCTransferCell.swift

@@ -96,7 +96,7 @@ class NCTransferCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellP
         longPressedGestureMore.delaysTouchesBegan = true
         buttonMore.addGestureRecognizer(longPressedGestureMore)
 
-        separator.backgroundColor = NCBrandColor.shared.separator
+        separator.backgroundColor = .separator
         separatorHeightConstraint.constant = 0.5
 
         labelTitle.text = ""

+ 1 - 2
iOSClient/Transfers/NCTransfers.swift

@@ -153,7 +153,6 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate {
 
     // MARK: - Collection View
 
-    @available(iOS 13.0, *)
     override func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
         return nil
     }
@@ -177,7 +176,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate {
         cell.imageItem.image = NCBrandColor.cacheImages.file
         cell.imageItem.backgroundColor = nil
         cell.labelTitle.text = metadata.fileNameView
-        cell.labelTitle.textColor = NCBrandColor.shared.label
+        cell.labelTitle.textColor = .label
         let serverUrlHome = NCUtilityFileSystem.shared.getHomeServer(account: metadata.account)
         var pathText = metadata.serverUrl.replacingOccurrences(of: serverUrlHome, with: "")
         if pathText == "" { pathText = "/" }

+ 2 - 2
iOSClient/Trash/Cell/NCTrashListCell+NCTrashCellProtocol.swift

@@ -70,7 +70,7 @@ class NCTrashListCell: UICollectionViewCell, NCTrashCellProtocol {
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
 
-        separator.backgroundColor = NCBrandColor.shared.separator
+        separator.backgroundColor = .separator
         separatorHeightConstraint.constant = 0.5
     }
 
@@ -138,7 +138,7 @@ extension NCTrashCellProtocol where Self: UICollectionViewCell {
     mutating func setupCellUI(tableTrash: tableTrash, image: UIImage?) {
         self.objectId = tableTrash.fileId
         self.labelTitle.text = tableTrash.trashbinFileName
-        self.labelTitle.textColor = NCBrandColor.shared.label
+        self.labelTitle.textColor = .label
         if self is NCTrashListCell {
             self.labelInfo?.text = CCUtility.dateDiff(tableTrash.date as Date)
         } else {

+ 2 - 2
iOSClient/Trash/NCTrash.swift

@@ -53,7 +53,7 @@ class NCTrash: UIViewController, NCSelectableNavigationView, NCTrashListCellDele
 
     override func viewDidLoad() {
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
         self.navigationController?.navigationBar.prefersLargeTitles = true
 
         // Cell
@@ -65,7 +65,7 @@ class NCTrash: UIViewController, NCSelectableNavigationView, NCTrashListCellDele
         collectionView.register(UINib(nibName: "NCSectionFooter", bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "sectionFooter")
 
         collectionView.alwaysBounceVertical = true
-        collectionView.backgroundColor = NCBrandColor.shared.systemBackground
+        collectionView.backgroundColor = .systemBackground
 
         listLayout = NCListLayout()
         gridLayout = NCGridLayout()

+ 16 - 22
iOSClient/UserStatus/NCUserStatus.swift

@@ -27,7 +27,6 @@ import Foundation
 import NextcloudKit
 import DropDown
 
-@available(iOS 13.0, *)
 class NCUserStatus: UIViewController {
 
     @IBOutlet weak var buttonCancel: UIBarButtonItem!
@@ -77,62 +76,62 @@ class NCUserStatus: UIViewController {
 
         self.navigationItem.title = NSLocalizedString("_online_status_", comment: "")
 
-        view.backgroundColor = NCBrandColor.shared.systemBackground
-        tableView.backgroundColor = NCBrandColor.shared.systemBackground
+        view.backgroundColor = .systemBackground
+        tableView.backgroundColor = .systemBackground
 
         buttonCancel.title = NSLocalizedString("_close_", comment: "")
 
         onlineButton.layer.cornerRadius = 10
         onlineButton.layer.masksToBounds = true
-        onlineButton.backgroundColor = NCBrandColor.shared.systemGray5
+        onlineButton.backgroundColor = .systemGray5
         let onLine = NCUtility.shared.getUserStatus(userIcon: nil, userStatus: "online", userMessage: nil)
         onlineImage.image = onLine.onlineStatus
         onlineLabel.text = onLine.statusMessage
-        onlineLabel.textColor = NCBrandColor.shared.label
+        onlineLabel.textColor = .label
 
         awayButton.layer.cornerRadius = 10
         awayButton.layer.masksToBounds = true
-        awayButton.backgroundColor = NCBrandColor.shared.systemGray5
+        awayButton.backgroundColor = .systemGray5
         let away = NCUtility.shared.getUserStatus(userIcon: nil, userStatus: "away", userMessage: nil)
         awayImage.image = away.onlineStatus
         awayLabel.text = away.statusMessage
-        awayLabel.textColor = NCBrandColor.shared.label
+        awayLabel.textColor = .label
 
         dndButton.layer.cornerRadius = 10
         dndButton.layer.masksToBounds = true
-        dndButton.backgroundColor = NCBrandColor.shared.systemGray5
+        dndButton.backgroundColor = .systemGray5
         let dnd = NCUtility.shared.getUserStatus(userIcon: nil, userStatus: "dnd", userMessage: nil)
         dndImage.image = dnd.onlineStatus
         dndLabel.text = dnd.statusMessage
-        dndLabel.textColor = NCBrandColor.shared.label
+        dndLabel.textColor = .label
         dndDescrLabel.text = dnd.descriptionMessage
         dndDescrLabel.textColor = .darkGray
 
         invisibleButton.layer.cornerRadius = 10
         invisibleButton.layer.masksToBounds = true
-        invisibleButton.backgroundColor = NCBrandColor.shared.systemGray5
+        invisibleButton.backgroundColor = .systemGray5
         let invisible = NCUtility.shared.getUserStatus(userIcon: nil, userStatus: "invisible", userMessage: nil)
         invisibleImage.image = invisible.onlineStatus
         invisibleLabel.text = invisible.statusMessage
-        invisibleLabel.textColor = NCBrandColor.shared.label
+        invisibleLabel.textColor = .label
         invisibleDescrLabel.text = invisible.descriptionMessage
         invisibleDescrLabel.textColor = .darkGray
 
         statusMessageLabel.text = NSLocalizedString("_status_message_", comment: "")
-        statusMessageLabel.textColor = NCBrandColor.shared.label
+        statusMessageLabel.textColor = .label
 
         statusMessageEmojiTextField.delegate = self
-        statusMessageEmojiTextField.backgroundColor = NCBrandColor.shared.systemGray5
+        statusMessageEmojiTextField.backgroundColor = .systemGray5
 
         statusMessageTextField.delegate = self
         statusMessageTextField.placeholder = NSLocalizedString("_status_message_placehorder_", comment: "")
-        statusMessageTextField.textColor = NCBrandColor.shared.label
+        statusMessageTextField.textColor = .label
 
         tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 1))
         tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
 
         clearStatusMessageAfterLabel.text = NSLocalizedString("_clear_status_message_after_", comment: "")
-        clearStatusMessageAfterLabel.textColor = NCBrandColor.shared.label
+        clearStatusMessageAfterLabel.textColor = .label
 
         clearStatusMessageAfterText.layer.cornerRadius = 5
         clearStatusMessageAfterText.layer.masksToBounds = true
@@ -155,9 +154,9 @@ class NCUserStatus: UIViewController {
         clearStatusMessageButton.layer.masksToBounds = true
         clearStatusMessageButton.layer.borderWidth = 0.5
         clearStatusMessageButton.layer.borderColor = UIColor.darkGray.cgColor
-        clearStatusMessageButton.backgroundColor = NCBrandColor.shared.systemGray5
+        clearStatusMessageButton.backgroundColor = .systemGray5
         clearStatusMessageButton.setTitle(NSLocalizedString("_clear_status_message_", comment: ""), for: .normal)
-        clearStatusMessageButton.setTitleColor(NCBrandColor.shared.label, for: .normal)
+        clearStatusMessageButton.setTitleColor(.label, for: .normal)
 
         setStatusMessageButton.layer.cornerRadius = 20
         setStatusMessageButton.layer.masksToBounds = true
@@ -476,7 +475,6 @@ class NCUserStatus: UIViewController {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCUserStatus: UITextFieldDelegate {
 
     func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
@@ -501,10 +499,8 @@ extension NCUserStatus: UITextFieldDelegate {
     }
 }
 
-@available(iOS 13.0, *)
 class emojiTextField: UITextField {
 
-    // required for iOS 13
     override var textInputContextIdentifier: String? { "" } // return non-nil to show the Emoji keyboard ¯\_(ツ)_/¯
 
     override var textInputMode: UITextInputMode? {
@@ -543,7 +539,6 @@ class emojiTextField: UITextField {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCUserStatus: UITableViewDelegate {
 
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
@@ -577,7 +572,6 @@ extension NCUserStatus: UITableViewDelegate {
     }
 }
 
-@available(iOS 13.0, *)
 extension NCUserStatus: UITableViewDataSource {
 
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

+ 1 - 1
iOSClient/Utility/NCActivityIndicator.swift

@@ -47,7 +47,7 @@ class NCActivityIndicator: NSObject {
             self.activityIndicator = UIActivityIndicatorView(style: style)
             guard let activityIndicator = self.activityIndicator, self.viewBackgroundActivityIndicator == nil else { return }
 
-            activityIndicator.color = NCBrandColor.shared.label
+            activityIndicator.color = .label
             activityIndicator.hidesWhenStopped = true
             activityIndicator.translatesAutoresizingMaskIntoConstraints = false
 

+ 25 - 53
iOSClient/Utility/NCUtility.swift

@@ -668,21 +668,16 @@ class NCUtility: NSObject {
 
         var image: UIImage?
 
-        if #available(iOS 13.0, *) {
-            // see https://stackoverflow.com/questions/71764255
-            let sfSymbolName = imageName.replacingOccurrences(of: "_", with: ".")
-            if let symbolConfiguration = symbolConfiguration {
-                image = UIImage(systemName: sfSymbolName, withConfiguration: symbolConfiguration as? UIImage.Configuration)?.imageColor(color)
-            } else {
-                image = UIImage(systemName: sfSymbolName)?.imageColor(color)
-            }
-            if image == nil {
-                image = UIImage(named: imageName)?.image(color: color, size: size)
-            }
+        // see https://stackoverflow.com/questions/71764255
+        let sfSymbolName = imageName.replacingOccurrences(of: "_", with: ".")
+        if let symbolConfiguration = symbolConfiguration {
+            image = UIImage(systemName: sfSymbolName, withConfiguration: symbolConfiguration as? UIImage.Configuration)?.withTintColor(color, renderingMode: .alwaysOriginal)
         } else {
+            image = UIImage(systemName: sfSymbolName)?.withTintColor(color, renderingMode: .alwaysOriginal)
+        }
+        if image == nil {
             image = UIImage(named: imageName)?.image(color: color, size: size)
         }
-
         if let image = image {
             return image
         }
@@ -705,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 {
@@ -854,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()
-            }
+        let appearance = UINavigationBarAppearance()
+        appearance.titleTextAttributes = [.foregroundColor: titleColor]
+        appearance.largeTitleTextAttributes = [.foregroundColor: titleColor]
 
-            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
-
-            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
     }
 

+ 3 - 3
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

@@ -169,10 +169,10 @@ class NCViewerMedia: UIViewController {
 
             viewerMediaPage?.navigationController?.setNavigationBarHidden(false, animated: true)
 
-            NCUtility.shared.colorNavigationController(viewerMediaPage?.navigationController, backgroundColor: NCBrandColor.shared.systemBackground, titleColor: NCBrandColor.shared.label, tintColor: nil, withoutShadow: false)
+            NCUtility.shared.colorNavigationController(viewerMediaPage?.navigationController, backgroundColor: .systemBackground, titleColor: .label, tintColor: nil, withoutShadow: false)
 
-            viewerMediaPage?.view.backgroundColor = NCBrandColor.shared.systemBackground
-            viewerMediaPage?.textColor = NCBrandColor.shared.label
+            viewerMediaPage?.view.backgroundColor = .systemBackground
+            viewerMediaPage?.textColor = .label
             viewerMediaPage?.progressView.isHidden = false
         }
     }

+ 1 - 1
iOSClient/Viewer/NCViewerMedia/NCViewerMediaDetailView.swift

@@ -59,7 +59,7 @@ class NCViewerMediaDetailView: UIView {
     override func awakeFromNib() {
         super.awakeFromNib()
 
-        separator.backgroundColor = NCBrandColor.shared.separator
+        separator.backgroundColor = .separator
         sizeLabel.text = ""
         sizeValue.text = ""
         dateLabel.text = ""

+ 5 - 5
iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift

@@ -51,7 +51,7 @@ class NCViewerMediaPage: UIViewController {
     var panGestureRecognizer: UIPanGestureRecognizer!
     var singleTapGestureRecognizer: UITapGestureRecognizer!
     var longtapGestureRecognizer: UILongPressGestureRecognizer!
-    var textColor: UIColor = NCBrandColor.shared.label
+    var textColor: UIColor = .label
     var playCommand: Any?
     var pauseCommand: Any?
     var skipForwardCommand: Any?
@@ -64,7 +64,7 @@ class NCViewerMediaPage: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: .label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
 
         singleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didSingleTapWith(gestureRecognizer:)))
         panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(didPanWith(gestureRecognizer:)))
@@ -187,9 +187,9 @@ class NCViewerMediaPage: UIViewController {
                 currentViewController.playerToolBar?.show(enableTimerAutoHide: enableTimerAutoHide)
             }
 
-            NCUtility.shared.colorNavigationController(navigationController, backgroundColor: NCBrandColor.shared.systemBackground, titleColor: NCBrandColor.shared.label, tintColor: nil, withoutShadow: false)
-            view.backgroundColor = NCBrandColor.shared.systemBackground
-            textColor = NCBrandColor.shared.label
+            NCUtility.shared.colorNavigationController(navigationController, backgroundColor: .systemBackground, titleColor: .label, tintColor: nil, withoutShadow: false)
+            view.backgroundColor = .systemBackground
+            textColor = .label
 
         } else {
 

+ 1 - 1
iOSClient/Viewer/NCViewerNextcloudText/NCViewerNextcloudText.swift

@@ -44,7 +44,7 @@ class NCViewerNextcloudText: UIViewController, WKNavigationDelegate, WKScriptMes
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: .label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
 
         navigationController?.navigationBar.prefersLargeTitles = false
         navigationItem.title = metadata.fileNameView

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

@@ -64,14 +64,10 @@ 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))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: .label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
         navigationItem.title = metadata.fileNameView
 
         // PDF VIEW
@@ -138,7 +134,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
 
         pageView.translatesAutoresizingMaskIntoConstraints = false
         pageView.layer.cornerRadius = 10
-        pageView.backgroundColor = NCBrandColor.shared.systemBackground.withAlphaComponent(
+        pageView.backgroundColor = .systemBackground.withAlphaComponent(
             UIAccessibility.isReduceTransparencyEnabled ? 1 : 0.5
         )
         view.addSubview(pageView)
@@ -153,7 +149,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
 
         pageViewLabel.translatesAutoresizingMaskIntoConstraints = false
         pageViewLabel.textAlignment = .center
-        pageViewLabel.textColor = NCBrandColor.shared.label
+        pageViewLabel.textColor = .label
         pageView.addSubview(pageViewLabel)
 
         NSLayoutConstraint.activate([
@@ -500,7 +496,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         pdfSelection.pages.forEach { page in
             let highlight = PDFAnnotation(bounds: pdfSelection.bounds(for: page), forType: .highlight, withProperties: nil)
             highlight.endLineStyle = .square
-            highlight.color = NCBrandColor.shared.annotationColor
+            highlight.color = .systemBlue
             page.addAnnotation(highlight)
         }
         if let page = pdfSelection.pages.first {

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

@@ -91,7 +91,7 @@ class NCViewerPDFSearch: UITableViewController, UISearchBarDelegate, PDFDocument
 
         let nsRange = NSString(string: extendSelection.string!).range(of: pdfSelection.string!, options: String.CompareOptions.caseInsensitive)
         if nsRange.location != NSNotFound {
-            let attributedSubString = NSAttributedString(string: NSString(string: extendSelection.string!).substring(with: nsRange), attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 17), NSAttributedString.Key.foregroundColor : NCBrandColor.shared.annotationColor])
+            let attributedSubString = NSAttributedString(string: NSString(string: extendSelection.string!).substring(with: nsRange), attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 17), NSAttributedString.Key.foregroundColor : UIColor.systemBlue])
             let attributedString = NSMutableAttributedString(string: extendSelection.string!)
             attributedString.replaceCharacters(in: nsRange, with: attributedSubString)
             cell.searchResultTextLabel.attributedText = attributedString

+ 0 - 1
iOSClient/Viewer/NCViewerQuickLook/NCViewerQuickLook.swift

@@ -114,7 +114,6 @@ extension NCViewerQuickLook: QLPreviewControllerDataSource, QLPreviewControllerD
         previewItems[index]
     }
 
-    @available(iOS 13.0, *)
     func previewController(_ controller: QLPreviewController, editingModeFor previewItem: QLPreviewItem) -> QLPreviewItemEditingMode {
         return isEditingEnabled ? .createCopy : .disabled
     }

+ 1 - 1
iOSClient/Viewer/NCViewerRichdocument/NCViewerRichdocument.swift

@@ -86,7 +86,7 @@ class NCViewerRichdocument: UIViewController, WKNavigationDelegate, WKScriptMess
         NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
 
         //
-        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: .label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
 
         navigationItem.hidesBackButton = true
         navigationController?.navigationBar.prefersLargeTitles = false