marinofaggiana 4 жил өмнө
parent
commit
0894283738

+ 4 - 2
iOSClient/Main/Create cloud/NCCreateFormUploadConflict.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="30l-Wp-khL">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="30l-Wp-khL">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -157,6 +157,8 @@
                         <outlet property="switchAlreadyExistingFiles" destination="08D-oc-nWS" id="VxI-9Q-9YY"/>
                         <outlet property="switchNewFiles" destination="ge9-Fi-Rb1" id="zy1-W2-UN8"/>
                         <outlet property="tableView" destination="wkN-gS-XKZ" id="rME-eq-aos"/>
+                        <outlet property="viewButton" destination="Fow-JU-J8L" id="bvK-IT-alH"/>
+                        <outlet property="viewSwitch" destination="qry-YF-g1N" id="OLz-XT-dMC"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="9m8-uR-gEZ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>

+ 28 - 0
iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift

@@ -36,6 +36,7 @@ extension NCCreateFormUploadConflictDelegate {
     @IBOutlet weak var labelTitle: UILabel!
     @IBOutlet weak var labelSubTitle: UILabel!
 
+    @IBOutlet weak var viewSwitch: UIView!
     @IBOutlet weak var switchNewFiles: UISwitch!
     @IBOutlet weak var switchAlreadyExistingFiles: UISwitch!
 
@@ -44,6 +45,7 @@ extension NCCreateFormUploadConflictDelegate {
 
     @IBOutlet weak var tableView: UITableView!
 
+    @IBOutlet weak var viewButton: UIView!
     @IBOutlet weak var buttonCancel: UIButton!
     @IBOutlet weak var buttonContinue: UIButton!
     
@@ -103,6 +105,30 @@ extension NCCreateFormUploadConflictDelegate {
         buttonContinue.layer.masksToBounds = true
         buttonContinue.setTitle(NSLocalizedString("_continue_", comment: ""), for: .normal)
         buttonContinue.isEnabled = false
+        
+        setColors(userInterfaceStyle: nil)
+    }
+    
+    override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
+        super.traitCollectionDidChange(previousTraitCollection)
+        
+        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+    }
+    
+    // MARK: - Colors
+    
+    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
+        
+        if userInterfaceStyle == .dark {
+            // personalized
+        } else {
+            // personalized
+        }
+        
+        view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        viewSwitch.backgroundColor = NCBrandColor.shared.systemGroupedBackground
+        viewButton.backgroundColor = NCBrandColor.shared.systemGroupedBackground
     }
     
     // MARK: - Action
@@ -260,6 +286,8 @@ extension NCCreateFormUploadConflict: UITableViewDataSource {
         
         if let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as? NCCreateFormUploadConflictCell {
             
+            cell.backgroundColor = tableView.backgroundColor
+            
             let metadataNewFile = metadatasUploadInConflict[indexPath.row]
 
             cell.ocId = metadataNewFile.ocId