Browse Source

Alignment V 4.0.5

marinofaggiana 3 years ago
parent
commit
f00d219579
2 changed files with 20 additions and 4 deletions
  1. 15 3
      Share/MainInterface.storyboard
  2. 5 1
      Share/NCShareExtension.swift

+ 15 - 3
Share/MainInterface.storyboard

@@ -60,12 +60,18 @@
                                                                 <constraint firstAttribute="height" constant="40" id="wvf-Ey-woY"/>
                                                             </constraints>
                                                         </imageView>
-                                                        <label opaque="NO" userInteractionEnabled="NO" tag="20" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rz6-pe-DB5">
-                                                            <rect key="frame" x="60" y="16.666666666666668" width="284" height="17.000000000000004"/>
+                                                        <label opaque="NO" userInteractionEnabled="NO" tag="20" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="filename" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rz6-pe-DB5">
+                                                            <rect key="frame" x="60" y="10" width="284" height="17"/>
                                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                             <nil key="textColor"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" tag="40" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="size" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QFh-Vy-b4Z">
+                                                            <rect key="frame" x="60" y="29.999999999999996" width="284" height="14.333333333333332"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                                            <color key="textColor" systemColor="systemGray2Color"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
                                                         <button opaque="NO" tag="30" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OGY-95-ZYi" customClass="NCShareExtensionButtonWithIndexPath" customModule="Share" customModuleProvider="target">
                                                             <rect key="frame" x="354" y="10" width="30" height="30"/>
                                                             <constraints>
@@ -76,13 +82,16 @@
                                                         </button>
                                                     </subviews>
                                                     <constraints>
-                                                        <constraint firstItem="rz6-pe-DB5" firstAttribute="centerY" secondItem="WGN-Zn-lR8" secondAttribute="centerY" id="Ag7-Ow-Ifk"/>
+                                                        <constraint firstItem="QFh-Vy-b4Z" firstAttribute="top" secondItem="rz6-pe-DB5" secondAttribute="bottom" constant="3" id="JuZ-ab-QUq"/>
                                                         <constraint firstItem="OGY-95-ZYi" firstAttribute="centerY" secondItem="WGN-Zn-lR8" secondAttribute="centerY" id="Mgu-E2-kgA"/>
+                                                        <constraint firstItem="OGY-95-ZYi" firstAttribute="leading" secondItem="QFh-Vy-b4Z" secondAttribute="trailing" constant="10" id="NNX-Me-vES"/>
                                                         <constraint firstItem="uvl-De-S9p" firstAttribute="centerY" secondItem="WGN-Zn-lR8" secondAttribute="centerY" id="bFC-cS-ePy"/>
                                                         <constraint firstItem="rz6-pe-DB5" firstAttribute="leading" secondItem="uvl-De-S9p" secondAttribute="trailing" constant="10" id="f94-aJ-igq"/>
                                                         <constraint firstItem="uvl-De-S9p" firstAttribute="leading" secondItem="WGN-Zn-lR8" secondAttribute="leading" constant="10" id="ko0-iM-oWa"/>
+                                                        <constraint firstItem="rz6-pe-DB5" firstAttribute="top" secondItem="WGN-Zn-lR8" secondAttribute="top" constant="10" id="rF0-WD-Hfk"/>
                                                         <constraint firstAttribute="trailing" secondItem="OGY-95-ZYi" secondAttribute="trailing" constant="10" id="si1-LI-Ldn"/>
                                                         <constraint firstItem="OGY-95-ZYi" firstAttribute="leading" secondItem="rz6-pe-DB5" secondAttribute="trailing" constant="10" id="vCb-2c-vWa"/>
+                                                        <constraint firstItem="QFh-Vy-b4Z" firstAttribute="leading" secondItem="uvl-De-S9p" secondAttribute="trailing" constant="10" id="xAp-ri-eOc"/>
                                                     </constraints>
                                                 </tableViewCellContentView>
                                                 <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
@@ -231,6 +240,9 @@
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
+        <systemColor name="systemGray2Color">
+            <color red="0.68235294117647061" green="0.68235294117647061" blue="0.69803921568627447" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </systemColor>
         <systemColor name="systemGray6Color">
             <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>

+ 5 - 1
Share/NCShareExtension.swift

@@ -687,7 +687,8 @@ extension NCShareExtension: UITableViewDataSource {
         let imageCell = cell.viewWithTag(10) as? UIImageView
         let fileNameCell = cell.viewWithTag(20) as? UILabel
         let moreButton = cell.viewWithTag(30) as? NCShareExtensionButtonWithIndexPath
-
+        let sizeCell = cell.viewWithTag(40) as? UILabel
+        
         imageCell?.layer.cornerRadius = 6
         imageCell?.layer.masksToBounds = true
 
@@ -706,6 +707,9 @@ extension NCShareExtension: UITableViewDataSource {
         
         fileNameCell?.text = fileName
         
+        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?.indexPath = indexPath
         moreButton?.fileName = fileName