Browse Source

Improved more

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
7003656b2f
3 changed files with 38 additions and 22 deletions
  1. 2 2
      iOSClient/More/NCMore.storyboard
  2. 10 1
      iOSClient/More/NCMore.swift
  3. 26 19
      iOSClient/More/NCMoreUserCell.xib

+ 2 - 2
iOSClient/More/NCMore.storyboard

@@ -18,7 +18,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="50" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="vQk-TA-f9i">
-                                <rect key="frame" x="0.0" y="78" width="414" height="702"/>
+                                <rect key="frame" x="0.0" y="0.0" width="414" height="780"/>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                 <inset key="separatorInset" minX="56" minY="0.0" maxX="0.0" maxY="0.0"/>
                                 <prototypes>
@@ -122,7 +122,7 @@
                         <constraints>
                             <constraint firstItem="4TU-gr-dbP" firstAttribute="leading" secondItem="mlb-3W-jqa" secondAttribute="leading" id="0ym-gy-V6B"/>
                             <constraint firstItem="4TU-gr-dbP" firstAttribute="top" secondItem="vQk-TA-f9i" secondAttribute="bottom" id="1Sw-wB-7sl"/>
-                            <constraint firstItem="vQk-TA-f9i" firstAttribute="top" secondItem="Kgv-Sq-Jzm" secondAttribute="top" constant="30" id="24K-1h-rR5"/>
+                            <constraint firstItem="vQk-TA-f9i" firstAttribute="top" secondItem="mlb-3W-jqa" secondAttribute="top" id="24K-1h-rR5"/>
                             <constraint firstItem="4TU-gr-dbP" firstAttribute="trailing" secondItem="mlb-3W-jqa" secondAttribute="trailing" id="3dZ-nJ-4Cx"/>
                             <constraint firstItem="vQk-TA-f9i" firstAttribute="leading" secondItem="mlb-3W-jqa" secondAttribute="leading" id="Eex-rm-AtS"/>
                             <constraint firstItem="vQk-TA-f9i" firstAttribute="trailing" secondItem="mlb-3W-jqa" secondAttribute="trailing" id="H6v-XK-GnB"/>

+ 10 - 1
iOSClient/More/NCMore.swift

@@ -253,7 +253,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
         if indexPath.section == 0 {
-            return 100
+            return 75
         } else {
             return NCGlobal.shared.heightCellSettings
         }
@@ -267,6 +267,15 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
             return 4
         }
     }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        
+        if section == 0 {
+            return 35
+        } else {
+            return 20
+        }
+    }
 
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
 

+ 26 - 19
iOSClient/More/NCMoreUserCell.xib

@@ -1,28 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CustomCellFileAndDirectory"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="0.0" reuseIdentifier="userCell" rowHeight="107" id="2" customClass="NCMoreUserCell" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
+            <rect key="frame" x="0.0" y="0.0" width="600" height="75"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2" id="sQq-jC-UEV">
-                <rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
+                <rect key="frame" x="0.0" y="0.0" width="600" height="75"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="display name" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNC-8X-DAC">
-                        <rect key="frame" x="20" y="75" width="560" height="18"/>
-                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                        <nil key="highlightedColor"/>
-                    </label>
                     <label opaque="NO" userInteractionEnabled="NO" tag="102" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="status" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p7I-KN-FVZ" customClass="MarqueeLabel" customModule="MarqueeLabel">
-                        <rect key="frame" x="335" y="48" width="245" height="14.5"/>
+                        <rect key="frame" x="80" y="42.5" width="500" height="15"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <nil key="highlightedColor"/>
                         <userDefinedRuntimeAttributes>
@@ -30,35 +25,42 @@
                         </userDefinedRuntimeAttributes>
                     </label>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="5">
-                        <rect key="frame" x="275" y="10" width="50" height="50"/>
+                        <rect key="frame" x="15" y="12.5" width="50" height="50"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="50" id="kM5-Uf-S8Z"/>
                             <constraint firstAttribute="height" constant="50" id="l9C-BW-ogy"/>
                         </constraints>
                     </imageView>
                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jy6-cx-LK4">
-                        <rect key="frame" x="310" y="45" width="20" height="20"/>
+                        <rect key="frame" x="50" y="47.5" width="20" height="20"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="20" id="3xZ-lf-n4v"/>
                             <constraint firstAttribute="height" constant="20" id="l81-IO-fzK"/>
                         </constraints>
                     </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="display name" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNC-8X-DAC">
+                        <rect key="frame" x="80" y="20" width="500" height="20.5"/>
+                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                 </subviews>
                 <color key="tintColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 <constraints>
-                    <constraint firstItem="QNC-8X-DAC" firstAttribute="leading" secondItem="sQq-jC-UEV" secondAttribute="leading" constant="20" id="Gpf-ni-W0A"/>
-                    <constraint firstAttribute="trailing" secondItem="QNC-8X-DAC" secondAttribute="trailing" constant="20" id="ICD-Fn-jbL"/>
-                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="jy6-cx-LK4" secondAttribute="trailing" constant="5" id="JtQ-Rf-ngA"/>
+                    <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"/>
                     <constraint firstItem="jy6-cx-LK4" firstAttribute="bottom" secondItem="5" secondAttribute="bottom" constant="5" id="MNe-PS-i7m"/>
-                    <constraint firstItem="5" firstAttribute="centerX" secondItem="sQq-jC-UEV" secondAttribute="centerX" id="MQs-0w-slX"/>
                     <constraint firstItem="jy6-cx-LK4" firstAttribute="trailing" secondItem="5" secondAttribute="trailing" constant="5" id="Ooq-nL-VC8"/>
-                    <constraint firstItem="5" firstAttribute="top" secondItem="sQq-jC-UEV" secondAttribute="top" constant="10" id="a8p-7g-2Em"/>
+                    <constraint firstItem="QNC-8X-DAC" firstAttribute="leading" secondItem="5" secondAttribute="trailing" constant="15" id="YCQ-mz-zQS"/>
                     <constraint firstAttribute="trailing" secondItem="p7I-KN-FVZ" secondAttribute="trailing" constant="20" id="bQd-pS-6a6"/>
-                    <constraint firstItem="QNC-8X-DAC" firstAttribute="top" secondItem="5" secondAttribute="bottom" constant="15" id="gDU-yC-ZfX"/>
-                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="centerY" secondItem="jy6-cx-LK4" secondAttribute="centerY" id="m7R-Q5-0AI"/>
+                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="top" secondItem="QNC-8X-DAC" secondAttribute="bottom" constant="2" id="xpT-Lo-lhI"/>
                 </constraints>
             </tableViewCellContentView>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="QNC-8X-DAC" firstAttribute="top" secondItem="2" secondAttribute="top" constant="20" id="NjO-V7-q8i"/>
+                <constraint firstItem="5" firstAttribute="centerY" secondItem="2" secondAttribute="centerY" id="bRf-Xg-Vtj"/>
+                <constraint firstItem="5" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="15" id="pDp-UJ-IcD"/>
+            </constraints>
             <connections>
                 <outlet property="avatar" destination="5" id="th9-2m-8sL"/>
                 <outlet property="displayName" destination="QNC-8X-DAC" id="H4w-nI-tsr"/>
@@ -68,4 +70,9 @@
             <point key="canvasLocation" x="662.39999999999998" y="189.3553223388306"/>
         </tableViewCell>
     </objects>
+    <designables>
+        <designable name="p7I-KN-FVZ">
+            <size key="intrinsicContentSize" width="35" height="14.5"/>
+        </designable>
+    </designables>
 </document>