Marino Faggiana 8 năm trước cách đây
mục cha
commit
08dd7e84d3

+ 4 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -552,6 +552,8 @@
 		F7BF1B431D51E893000854F6 /* CCLoginNCOC.m in Sources */ = {isa = PBXBuildFile; fileRef = F7BF1B401D51E893000854F6 /* CCLoginNCOC.m */; };
 		F7CE28851D1ACFA70025783C /* CCProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7CE28801D1ACFA70025783C /* CCProgressView.m */; };
 		F7CE28881D1ACFA70025783C /* UINavigationController+CCProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = F7CE28821D1ACFA70025783C /* UINavigationController+CCProgress.m */; };
+		F7D2677C1E157053005ACB7E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7F67BB81A24D27800EE80DA /* Images.xcassets */; };
+		F7D267871E157057005ACB7E /* Nextcloud.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7596C771D128FC80092A6B8 /* Nextcloud.xcassets */; };
 		F7D6A0911D82DBFA0045AD1A /* CCControlCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = F7D6A08A1D82DBFA0045AD1A /* CCControlCenter.m */; };
 		F7D6A0931D82DBFA0045AD1A /* CCControlCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F7D6A08C1D82DBFA0045AD1A /* CCControlCenterCell.m */; };
 		F7D6A0951D82DBFA0045AD1A /* CCControlCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7D6A08D1D82DBFA0045AD1A /* CCControlCenterCell.xib */; };
@@ -3528,9 +3530,11 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				F7D267871E157057005ACB7E /* Nextcloud.xcassets in Resources */,
 				F7FC88FD1E141A3F006D0506 /* Error.strings in Resources */,
 				F7FC88FB1E141A34006D0506 /* BKPasscodeView.strings in Resources */,
 				F7FC88FC1E141A39006D0506 /* Localizable.strings in Resources */,
+				F7D2677C1E157053005ACB7E /* Images.xcassets in Resources */,
 				F743441A1E1264EE001CC831 /* MainInterface.storyboard in Resources */,
 				F743444B1E126B69001CC831 /* CCMove.storyboard in Resources */,
 			);

+ 15 - 8
Picker/Base.lproj/MainInterface.storyboard

@@ -18,20 +18,29 @@
                         <viewControllerLayoutGuide type="bottom" id="UQD-kz-Mfv"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="Vdh-Gp-eV6">
-                        <rect key="frame" x="0.0" y="0.0" width="350" height="400"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="vA7-yc-aM1">
-                                <rect key="frame" x="0.0" y="0.0" width="350" height="400"/>
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="0H6-U8-fd4" userLabel="Cell">
-                                        <rect key="frame" x="0.0" y="28" width="350" height="44"/>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="60" id="0H6-U8-fd4" userLabel="Cell" customClass="recordMetadataCell" customModule="Picker" customModuleProvider="target">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="60"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0H6-U8-fd4" id="44X-Sr-gc0">
-                                            <rect key="frame" x="0.0" y="0.0" width="350" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="59"/>
                                             <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wk9-rb-4yv">
+                                                    <rect key="frame" x="10" y="10" width="40" height="40"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                            </subviews>
                                         </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="fileImageView" destination="Wk9-rb-4yv" id="K2a-JK-zkR"/>
+                                        </connections>
                                     </tableViewCell>
                                 </prototypes>
                                 <connections>
@@ -48,15 +57,13 @@
                             <constraint firstItem="vA7-yc-aM1" firstAttribute="bottom" secondItem="UQD-kz-Mfv" secondAttribute="top" id="wSm-cl-ClV"/>
                         </constraints>
                     </view>
-                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-                    <size key="freeformSize" width="350" height="400"/>
                     <connections>
                         <outlet property="tableView" destination="vA7-yc-aM1" id="nuO-LH-LFc"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="UoZ-ya-W3e" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="116.8" y="123.23838080959521"/>
+            <point key="canvasLocation" x="121" y="142"/>
         </scene>
     </scenes>
 </document>

+ 11 - 6
Picker/DocumentPickerViewController.swift

@@ -108,14 +108,19 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
     }
 }
 
+// MARK: - Class UITableViewCell
+
+class recordMetadataCell: UITableViewCell {
+    
+    @IBOutlet weak var fileImageView: UIImageView!
+}
+
 // MARK: - UITableViewDataSource
+
 extension DocumentPickerViewController: UITableViewDataSource {
     
-    // MARK: - CellIdentifiers
-    fileprivate enum CellIdentifier: String {
-        case Cell = "Cell"
-    }
-    
+    // MARK: - View Life Cycle
+
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         
         return recordsTableMetadata.count
@@ -123,7 +128,7 @@ extension DocumentPickerViewController: UITableViewDataSource {
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         
-        let cell = tableView.dequeueReusableCell(withIdentifier: CellIdentifier.Cell.rawValue, for: indexPath)
+        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! recordMetadataCell
         
         let record = recordsTableMetadata[(indexPath as NSIndexPath).row]