Pārlūkot izejas kodu

Improved more

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 gadi atpakaļ
vecāks
revīzija
505b88f484
2 mainītis faili ar 19 papildinājumiem un 3 dzēšanām
  1. 2 2
      iOSClient/More/NCMore.storyboard
  2. 17 1
      iOSClient/More/NCMore.swift

+ 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="0.0" width="414" height="780"/>
+                                <rect key="frame" x="0.0" y="78" width="414" height="702"/>
                                 <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="mlb-3W-jqa" secondAttribute="top" id="24K-1h-rR5"/>
+                            <constraint firstItem="vQk-TA-f9i" firstAttribute="top" secondItem="Kgv-Sq-Jzm" secondAttribute="top" constant="30" 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"/>

+ 17 - 1
iOSClient/More/NCMore.swift

@@ -347,6 +347,8 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                     }
                 }
             }
+            
+            cell.layer.cornerRadius = 20
 
             return cell
 
@@ -478,7 +480,7 @@ class CCCellMore: UITableViewCell {
 
     override var frame: CGRect {
         get {
-            return super.frame
+            return super.bounds
         }
         set (newFrame) {
             var frame = newFrame
@@ -497,4 +499,18 @@ class NCMoreUserCell: UITableViewCell {
     @IBOutlet weak var avatar: UIImageView!
     @IBOutlet weak var icon: UIImageView!
     @IBOutlet weak var status: MarqueeLabel!
+    
+    override var frame: CGRect {
+        get {
+            return super.bounds
+        }
+        set (newFrame) {
+            var frame = newFrame
+            let newWidth = frame.width * 0.90
+            let space = (frame.width - newWidth) / 2
+            frame.size.width = newWidth
+            frame.origin.x += space
+            super.frame = frame
+        }
+    }
 }