Marino Faggiana 7 år sedan
förälder
incheckning
9b95bb1315

BIN
iOSClient/Images.xcassets/disclosureIndicator.imageset/disclosureIndicator@2x.png


+ 31 - 0
iOSClient/Main/CCMore.swift

@@ -42,6 +42,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     
     var menuExternalSite: [TableExternalSites]?
     var tableAccont : TableAccount?
+    var refreshControl: UIRefreshControl!
     
     override func viewDidLoad() {
         
@@ -54,6 +55,14 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         
         imageLogo.image = UIImage.init(named: NCBrandImages.sharedInstance.themingBackground)
         
+        // Refresh COntroller
+        /*
+        refreshControl = UIRefreshControl()
+        refreshControl.addTarget(self, action: #selector(self.refresh), for: UIControlEvents.valueChanged)
+        //refreshControl.tintColor = UIColor.clear
+        tableView.addSubview(refreshControl)
+        */
+        
         // create tap gesture recognizer
         let tapQuota = UITapGestureRecognizer(target: self, action: #selector(tapLabelQuotaExternalSite))
         labelQuotaExternalSite.isUserInteractionEnabled = true
@@ -315,6 +324,28 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         }
     }
     
+    func refresh(sender:AnyObject) {
+        // Code to refresh table view
+        refreshControl.endRefreshing()
+    }
+    
+    func scrollViewDidScroll(_ scrollView: UIScrollView) {
+        let offsetY = tableView.contentOffset.y
+        print(" Y : \(offsetY)")
+
+        /*
+        let imageLogoH = self.imageLogo.frame.size.height
+        
+        //if (imageLogoH > self.imageLogo.frame.size.height-offsetY) {
+            self.imageLogo.frame = CGRect(x: self.imageLogo.frame.origin.x, y: self.imageLogo.frame.origin.y, width: self.imageLogo.frame.size.width, height: self.imageLogo.frame.size.height-offsetY)
+        } else {
+            self.imageLogo.frame = CGRect(x: self.imageLogo.frame.origin.x, y: self.imageLogo.frame.origin.y, width: self.imageLogo.frame.size.width, height: self.imageLogo.frame.size.height+offsetY)
+
+        }
+    */
+        //self.imageLogo.frame = CGRect(x: self.imageLogo.frame.origin.x, y: self.imageLogo.frame.origin.y, width: self.imageLogo.frame.size.width-y, height: self.imageLogo.frame.size.height-y)
+    }
+    
     func tapLabelQuotaExternalSite() {
         
         if (quotaMenu.count > 0) {

+ 15 - 15
iOSClient/Main/Main.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="4IE-mo-rkp">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="4IE-mo-rkp">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -68,27 +68,27 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MoreBackground" translatesAutoresizingMaskIntoConstraints="NO" id="cxb-Vw-8zb">
-                                <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                 <constraints>
-                                    <constraint firstAttribute="height" constant="100" id="mmt-Ka-rkQ"/>
+                                    <constraint firstAttribute="height" constant="200" id="mmt-Ka-rkQ"/>
                                 </constraints>
                             </imageView>
                             <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="disclosureIndicator" translatesAutoresizingMaskIntoConstraints="NO" id="Hxn-XA-fmj">
-                                <rect key="frame" x="346" y="37" width="24" height="26"/>
+                                <rect key="frame" x="346" y="62" width="24" height="26"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="24" id="t8K-rR-nO7"/>
                                     <constraint firstAttribute="height" constant="26" id="wKO-XG-ygn"/>
                                 </constraints>
                             </imageView>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" rowHeight="50" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="Xym-IM-aqh">
-                                <rect key="frame" x="0.0" y="100" width="375" height="567"/>
+                                <rect key="frame" x="0.0" y="150" width="375" height="517"/>
                                 <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="55.5" width="375" height="50"/>
+                                        <rect key="frame" x="0.0" y="56" 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="49.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RZt-EQ-32U">
@@ -125,7 +125,7 @@
                                 </connections>
                             </tableView>
                             <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="DWx-1W-vs0" customClass="SwiftyAvatar" customModule="Nextcloud" customModuleProvider="target">
-                                <rect key="frame" x="15" y="25" width="50" height="50"/>
+                                <rect key="frame" x="15" y="50" width="50" height="50"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="50" id="QAM-AU-L76"/>
                                     <constraint firstAttribute="height" constant="50" id="Quc-kC-yu5"/>
@@ -140,8 +140,8 @@
                                 </userDefinedRuntimeAttributes>
                             </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="username" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BiW-NW-hVZ">
-                                <rect key="frame" x="78" y="40" width="72" height="20"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                <rect key="frame" x="78" y="65" width="75.5" height="20"/>
+                                <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <nil key="highlightedColor"/>
                             </label>
@@ -182,20 +182,20 @@
                         <constraints>
                             <constraint firstAttribute="bottom" secondItem="Xym-IM-aqh" secondAttribute="bottom" id="0E5-2f-72F"/>
                             <constraint firstItem="cxb-Vw-8zb" firstAttribute="top" secondItem="XtC-Je-LUc" secondAttribute="topMargin" id="2z9-1h-2dU"/>
-                            <constraint firstItem="DWx-1W-vs0" firstAttribute="centerY" secondItem="cxb-Vw-8zb" secondAttribute="centerY" id="9Ti-IK-MeQ"/>
+                            <constraint firstItem="DWx-1W-vs0" firstAttribute="centerY" secondItem="cxb-Vw-8zb" secondAttribute="centerY" constant="-25" id="9Ti-IK-MeQ"/>
                             <constraint firstAttribute="bottom" secondItem="NxR-5x-edP" secondAttribute="bottom" id="9bH-mG-bse"/>
                             <constraint firstAttribute="trailing" secondItem="cxb-Vw-8zb" secondAttribute="trailing" id="AjJ-cB-0xu"/>
                             <constraint firstItem="cxb-Vw-8zb" firstAttribute="left" secondItem="DWx-1W-vs0" secondAttribute="left" constant="-15" id="CzV-Na-OWE"/>
                             <constraint firstItem="Xym-IM-aqh" firstAttribute="leading" secondItem="cxb-Vw-8zb" secondAttribute="leading" id="DKF-Y7-cmv"/>
+                            <constraint firstItem="Hxn-XA-fmj" firstAttribute="centerY" secondItem="cxb-Vw-8zb" secondAttribute="centerY" constant="-25" id="Dva-a3-6dg"/>
                             <constraint firstAttribute="trailing" secondItem="NxR-5x-edP" secondAttribute="trailing" id="LJB-St-B4Y"/>
                             <constraint firstAttribute="trailingMargin" secondItem="Hxn-XA-fmj" secondAttribute="trailing" constant="-11" id="NwY-of-hgF"/>
                             <constraint firstItem="Xym-IM-aqh" firstAttribute="trailing" secondItem="cxb-Vw-8zb" secondAttribute="trailing" id="SNN-Jv-Ezx"/>
                             <constraint firstItem="NxR-5x-edP" firstAttribute="leading" secondItem="XtC-Je-LUc" secondAttribute="leading" id="Xjg-WL-zva"/>
-                            <constraint firstItem="Xym-IM-aqh" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" id="gtG-qs-qFg"/>
+                            <constraint firstItem="Xym-IM-aqh" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" constant="-50" id="gtG-qs-qFg"/>
                             <constraint firstItem="cxb-Vw-8zb" firstAttribute="leading" secondItem="XtC-Je-LUc" secondAttribute="leading" id="qyg-dI-shE"/>
                             <constraint firstItem="BiW-NW-hVZ" firstAttribute="leading" secondItem="DWx-1W-vs0" secondAttribute="trailing" constant="13" id="uDv-hU-dPQ"/>
-                            <constraint firstItem="Hxn-XA-fmj" firstAttribute="top" secondItem="cxb-Vw-8zb" secondAttribute="bottom" constant="-63" id="uma-04-4i6"/>
-                            <constraint firstItem="BiW-NW-hVZ" firstAttribute="centerY" secondItem="cxb-Vw-8zb" secondAttribute="centerY" id="xgp-S6-l5Z"/>
+                            <constraint firstItem="BiW-NW-hVZ" firstAttribute="centerY" secondItem="cxb-Vw-8zb" secondAttribute="centerY" constant="-25" id="xgp-S6-l5Z"/>
                         </constraints>
                     </view>
                     <navigationItem key="navigationItem" id="170-MG-QpZ"/>

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -61,7 +61,7 @@
     form.rowNavigationOptions = XLFormRowNavigationOptionNone;
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"pickerAccount" rowType:XLFormRowDescriptorTypePicker];
-    row.height = 90;
+    row.height = 100;
     row.selectorOptions = listAccount;
     row.value = app.activeAccount;
     [section addFormRow:row];