瀏覽代碼

New menu More

Marino Faggiana 8 年之前
父節點
當前提交
871716c052
共有 2 個文件被更改,包括 44 次插入27 次删除
  1. 11 3
      iOSClient/Main/CCMore.swift
  2. 33 24
      iOSClient/Main/Main.storyboard

+ 11 - 3
iOSClient/Main/CCMore.swift

@@ -26,6 +26,8 @@ import UIKit
 
 class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
+    @IBOutlet weak var imageLogo: UIImageView!
+    @IBOutlet weak var imageUser: UIImageView!
     @IBOutlet weak var tableView: UITableView!
     @IBOutlet weak var labelQuota: UILabel!
     @IBOutlet weak var progressQuota: UIProgressView!
@@ -42,14 +44,20 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         super.viewDidLoad()
         
         // This view controller itself will provide the delegate methods and row data for the table view.
-        tableView.delegate = self
-        tableView.dataSource = self
+        self.tableView.delegate = self
+        self.tableView.dataSource = self
+
+        CCAspect.aspectNavigationControllerBar(self.navigationController?.navigationBar, encrypted: false, online: appDelegate.reachability.isReachable(), hidden: true)
+        CCAspect.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
     }
     
     override func viewDidAppear(_ animated: Bool) {
         
         // Get External Site
-        externalSite = CCCoreData.getAllTableExternalSites(with:  NSPredicate(format: "(account == '\(appDelegate.activeAccount!))")) as? [TableExternalSites]
+        //externalSite = CCCoreData.getAllTableExternalSites(with:  NSPredicate(format: "(account == '\(appDelegate.activeAccount!))")) as? [TableExternalSites]
+        
+        CCAspect.aspectNavigationControllerBar(self.navigationController?.navigationBar, encrypted: false, online: appDelegate.reachability.isReachable(), hidden: true)
+        CCAspect.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
         
         tableView.reloadData()
     }

+ 33 - 24
iOSClient/Main/Main.storyboard

@@ -68,7 +68,7 @@
         <!--More-->
         <scene sceneID="Mdr-ch-zRI">
             <objects>
-                <viewController id="9DM-ts-oJu" customClass="CCMore" sceneMemberID="viewController">
+                <viewController extendedLayoutIncludesOpaqueBars="YES" id="9DM-ts-oJu" customClass="CCMore" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="myb-PI-7vm"/>
                         <viewControllerLayoutGuide type="bottom" id="vKf-mG-hvt"/>
@@ -78,17 +78,20 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="nextcloudBackground" translatesAutoresizingMaskIntoConstraints="NO" id="cxb-Vw-8zb">
-                                <rect key="frame" x="0.0" y="64" width="375" height="122"/>
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="80" id="mmt-Ka-rkQ"/>
+                                </constraints>
                             </imageView>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Xym-IM-aqh">
-                                <rect key="frame" x="0.0" y="194" width="375" height="413"/>
+                                <rect key="frame" x="0.0" y="80" width="375" height="507"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="50" id="zQQ-52-W9I" customClass="CCCellMore" customModule="Nextcloud" customModuleProvider="target">
                                         <rect key="frame" x="0.0" y="28" width="375" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zQQ-52-W9I" id="Zho-os-HYj">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RZt-EQ-32U">
@@ -119,49 +122,54 @@
                                         </connections>
                                     </tableViewCell>
                                 </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="9DM-ts-oJu" id="30F-1v-Nuf"/>
+                                    <outlet property="delegate" destination="9DM-ts-oJu" id="ePC-4O-7ui"/>
+                                </connections>
                             </tableView>
-                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DWx-1W-vs0">
-                                <rect key="frame" x="16" y="73" width="60" height="60"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
-                            </imageView>
                             <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="HgC-Ub-Dtb">
-                                <rect key="frame" x="10" y="627" width="297" height="2"/>
+                                <rect key="frame" x="16" y="591" width="343" height="2"/>
                             </progressView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WdB-hd-mrv">
-                                <rect key="frame" x="16" y="638" width="343" height="17"/>
+                                <rect key="frame" x="16" y="599" width="343" height="17"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="DWx-1W-vs0">
+                                <rect key="frame" x="17" y="15" width="50" height="50"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
+                            </imageView>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="cxb-Vw-8zb" firstAttribute="top" secondItem="myb-PI-7vm" secondAttribute="bottom" id="4l7-cf-DHE"/>
+                            <constraint firstItem="cxb-Vw-8zb" firstAttribute="top" secondItem="XtC-Je-LUc" secondAttribute="topMargin" id="2z9-1h-2dU"/>
                             <constraint firstItem="WdB-hd-mrv" firstAttribute="leading" secondItem="XtC-Je-LUc" secondAttribute="leadingMargin" id="9ET-QC-35O"/>
                             <constraint firstAttribute="trailing" secondItem="cxb-Vw-8zb" secondAttribute="trailing" id="AjJ-cB-0xu"/>
                             <constraint firstItem="Xym-IM-aqh" firstAttribute="leading" secondItem="cxb-Vw-8zb" secondAttribute="leading" id="DKF-Y7-cmv"/>
                             <constraint firstItem="WdB-hd-mrv" firstAttribute="trailing" secondItem="XtC-Je-LUc" secondAttribute="trailingMargin" id="FPW-TD-fS8"/>
-                            <constraint firstAttribute="leadingMargin" secondItem="HgC-Ub-Dtb" secondAttribute="leading" constant="6" id="HZo-wI-3Vc"/>
-                            <constraint firstItem="WdB-hd-mrv" firstAttribute="top" secondItem="HgC-Ub-Dtb" secondAttribute="bottom" constant="9" id="J6a-bU-rSQ"/>
+                            <constraint firstAttribute="leadingMargin" secondItem="HgC-Ub-Dtb" secondAttribute="leading" id="HZo-wI-3Vc"/>
+                            <constraint firstItem="WdB-hd-mrv" firstAttribute="top" secondItem="HgC-Ub-Dtb" secondAttribute="bottom" constant="6" id="J6a-bU-rSQ"/>
                             <constraint firstItem="Xym-IM-aqh" firstAttribute="trailing" secondItem="cxb-Vw-8zb" secondAttribute="trailing" id="SNN-Jv-Ezx"/>
-                            <constraint firstAttribute="trailingMargin" secondItem="HgC-Ub-Dtb" secondAttribute="trailing" constant="52" id="UCm-fo-XLY"/>
-                            <constraint firstItem="HgC-Ub-Dtb" firstAttribute="top" secondItem="Xym-IM-aqh" secondAttribute="bottom" constant="20" id="bcj-pp-ogX"/>
-                            <constraint firstItem="Xym-IM-aqh" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" constant="8" id="gtG-qs-qFg"/>
-                            <constraint firstAttribute="bottom" secondItem="Xym-IM-aqh" secondAttribute="bottom" constant="60" id="iky-9q-uu8"/>
-                            <constraint firstItem="vKf-mG-hvt" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" constant="481" id="qZP-h6-sJW"/>
+                            <constraint firstAttribute="trailingMargin" secondItem="HgC-Ub-Dtb" secondAttribute="trailing" id="UCm-fo-XLY"/>
+                            <constraint firstItem="HgC-Ub-Dtb" firstAttribute="top" secondItem="Xym-IM-aqh" secondAttribute="bottom" constant="4" id="bcj-pp-ogX"/>
+                            <constraint firstItem="Xym-IM-aqh" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" id="gtG-qs-qFg"/>
+                            <constraint firstAttribute="bottom" secondItem="Xym-IM-aqh" secondAttribute="bottom" constant="80" id="iky-9q-uu8"/>
                             <constraint firstItem="cxb-Vw-8zb" firstAttribute="leading" secondItem="XtC-Je-LUc" secondAttribute="leading" id="qyg-dI-shE"/>
                         </constraints>
                     </view>
                     <navigationItem key="navigationItem" id="170-MG-QpZ"/>
                     <connections>
-                        <outlet property="labelQuota" destination="WdB-hd-mrv" id="E8O-S8-Hh2"/>
-                        <outlet property="progressQuota" destination="HgC-Ub-Dtb" id="l5v-Nu-A4I"/>
-                        <outlet property="tableView" destination="Xym-IM-aqh" id="BM5-cf-ZtQ"/>
+                        <outlet property="imageLogo" destination="cxb-Vw-8zb" id="U9H-30-zBN"/>
+                        <outlet property="imageUser" destination="DWx-1W-vs0" id="dII-b5-rqX"/>
+                        <outlet property="labelQuota" destination="WdB-hd-mrv" id="Ozy-WV-w5O"/>
+                        <outlet property="progressQuota" destination="HgC-Ub-Dtb" id="mpA-O3-SpS"/>
+                        <outlet property="tableView" destination="Xym-IM-aqh" id="Esm-wN-pr1"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="D6O-WR-IEL" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="9212" y="1218"/>
+            <point key="canvasLocation" x="9212" y="1217.5412293853074"/>
         </scene>
         <!--Offline Container-->
         <scene sceneID="AYB-62-j4s">
@@ -720,7 +728,7 @@
         <!--More-->
         <scene sceneID="4RE-f1-SKU">
             <objects>
-                <navigationController automaticallyAdjustsScrollViewInsets="NO" id="1Z8-Bx-Dqo" sceneMemberID="viewController">
+                <navigationController automaticallyAdjustsScrollViewInsets="NO" navigationBarHidden="YES" id="1Z8-Bx-Dqo" sceneMemberID="viewController">
                     <tabBarItem key="tabBarItem" title="More" image="tabBarMore" id="U4f-qS-cgh"/>
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="yVo-p8-ApS">
@@ -739,6 +747,7 @@
     </scenes>
     <resources>
         <image name="Plus" width="40" height="40"/>
+        <image name="avatar" width="25" height="25"/>
         <image name="cryptocloud_sfondo_iPad" width="256" height="187"/>
         <image name="fileNextcloud" width="25" height="25"/>
         <image name="nextcloudBackground" width="960" height="640"/>
@@ -747,6 +756,6 @@
         <image name="tabBarPhotos" width="25" height="21"/>
     </resources>
     <inferredMetricsTieBreakers>
-        <segue reference="45n-bF-9RO"/>
+        <segue reference="op6-ow-K8v"/>
     </inferredMetricsTieBreakers>
 </document>