Browse Source

dev new share view

marinofaggiana 5 years ago
parent
commit
0940725937

+ 15 - 0
iOSClient/Images.xcassets/arrowRight.imageset/Contents.json

@@ -0,0 +1,15 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "arrowRight.pdf"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
+  }
+}

+ 52 - 0
iOSClient/Images.xcassets/arrowRight.imageset/arrowRight.pdf

@@ -0,0 +1,52 @@
+%PDF-1.4
+%Óëéá
+1 0 obj
+<</Creator (Chromium)
+/Producer (Skia/PDF m69)
+/CreationDate (D:20190719145341+00'00')
+/ModDate (D:20190719145341+00'00')>>
+endobj
+2 0 obj
+<</Filter /FlateDecode
+/Length 139>> stream
+xœUN;Â0Ý}
+ÏH;nšäÌL *0¤HÀý%^š­-Ùïùól	^Vc…ŸeG=QÐÌÓBj}ó¤’ÝCÜÃïL÷¿1“˜e�«Ø�@ârU~þh`3^Zr®dã–U ™€MJP˜±ÀV*’±ŽÝA4õo7�Ø÷Çv¢öK•^ô üz.&
+endstream
+endobj
+3 0 obj
+<</Type /Catalog
+/Pages 4 0 R>>
+endobj
+4 0 obj
+<</Type /Pages
+/Count 1
+/Kids [5 0 R]>>
+endobj
+5 0 obj
+<</Type /Page
+/Resources <</ProcSets [/PDF /Text /ImageB /ImageC /ImageI]
+/ExtGState <</G0 6 0 R>>>>
+/MediaBox [0 0 329.03998 329.03998]
+/Contents 2 0 R
+/Parent 4 0 R>>
+endobj
+6 0 obj
+<</ca 1
+/BM /Normal>>
+endobj
+xref
+0 7
+0000000000 65535 f 
+0000000015 00000 n 
+0000000154 00000 n 
+0000000363 00000 n 
+0000000410 00000 n 
+0000000465 00000 n 
+0000000649 00000 n 
+trailer
+<</Size 7
+/Root 3 0 R
+/Info 1 0 R>>
+startxref
+686
+%%EOF

+ 84 - 1
iOSClient/Share/NCShare.storyboard

@@ -66,13 +66,96 @@
                     <view key="view" contentMode="scaleToFill" id="aV2-U6-JTf">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X2m-IC-J1u" userLabel="View container">
+                                <rect key="frame" x="5" y="244" width="404" height="608"/>
+                                <subviews>
+                                    <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="iSO-mc-0TB">
+                                        <rect key="frame" x="5" y="20" width="354" height="30"/>
+                                        <nil key="textColor"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <textInputTraits key="textInputTraits"/>
+                                    </textField>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f5j-bG-pbj">
+                                        <rect key="frame" x="369" y="20" width="30" height="30"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="30" id="Ikg-Fn-Sfc"/>
+                                            <constraint firstAttribute="width" constant="30" id="rfv-yn-tpm"/>
+                                        </constraints>
+                                        <state key="normal" image="arrowRight"/>
+                                    </button>
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="c94-b9-Sim">
+                                        <rect key="frame" x="0.0" y="150" width="404" height="458"/>
+                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    </tableView>
+                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8Cj-cK-AKZ">
+                                        <rect key="frame" x="5" y="64" width="40" height="40"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="40" id="CCv-Uu-Vel"/>
+                                            <constraint firstAttribute="width" constant="40" id="egJ-xl-yj4"/>
+                                        </constraints>
+                                    </imageView>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share link" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQW-aQ-ydN">
+                                        <rect key="frame" x="53" y="73.5" width="286" height="21"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qek-aQ-NjE">
+                                        <rect key="frame" x="369" y="69" width="30" height="30"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="30" id="BAT-jK-rUt"/>
+                                            <constraint firstAttribute="height" constant="30" id="zc5-W6-SXG"/>
+                                        </constraints>
+                                        <state key="normal" image="add"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="f5j-bG-pbj" firstAttribute="centerY" secondItem="iSO-mc-0TB" secondAttribute="centerY" id="8Aa-Tz-QVA"/>
+                                    <constraint firstAttribute="trailing" secondItem="c94-b9-Sim" secondAttribute="trailing" id="BtN-cJ-TTc"/>
+                                    <constraint firstItem="c94-b9-Sim" firstAttribute="top" secondItem="iSO-mc-0TB" secondAttribute="bottom" constant="100" id="Co6-l6-HiT"/>
+                                    <constraint firstItem="f5j-bG-pbj" firstAttribute="leading" secondItem="iSO-mc-0TB" secondAttribute="trailing" constant="10" id="GBQ-j9-3mM"/>
+                                    <constraint firstItem="SQW-aQ-ydN" firstAttribute="centerY" secondItem="8Cj-cK-AKZ" secondAttribute="centerY" id="LtS-8d-L7a"/>
+                                    <constraint firstItem="Qek-aQ-NjE" firstAttribute="centerY" secondItem="8Cj-cK-AKZ" secondAttribute="centerY" id="NYZ-hc-SBk"/>
+                                    <constraint firstItem="SQW-aQ-ydN" firstAttribute="leading" secondItem="8Cj-cK-AKZ" secondAttribute="trailing" constant="8" id="Oby-Ea-MaC"/>
+                                    <constraint firstAttribute="bottom" secondItem="c94-b9-Sim" secondAttribute="bottom" id="Svm-RV-vnl"/>
+                                    <constraint firstItem="Qek-aQ-NjE" firstAttribute="leading" secondItem="SQW-aQ-ydN" secondAttribute="trailing" constant="30" id="UAz-au-krl"/>
+                                    <constraint firstItem="8Cj-cK-AKZ" firstAttribute="leading" secondItem="X2m-IC-J1u" secondAttribute="leading" constant="5" id="WlZ-CY-x4s"/>
+                                    <constraint firstAttribute="trailing" secondItem="f5j-bG-pbj" secondAttribute="trailing" constant="5" id="Yb4-KO-nwi"/>
+                                    <constraint firstItem="iSO-mc-0TB" firstAttribute="leading" secondItem="X2m-IC-J1u" secondAttribute="leading" constant="5" id="d8E-WM-YfC"/>
+                                    <constraint firstItem="iSO-mc-0TB" firstAttribute="top" secondItem="X2m-IC-J1u" secondAttribute="top" constant="20" id="jPM-Uo-0lS"/>
+                                    <constraint firstAttribute="trailing" secondItem="Qek-aQ-NjE" secondAttribute="trailing" constant="5" id="puY-4D-ARy"/>
+                                    <constraint firstItem="c94-b9-Sim" firstAttribute="leading" secondItem="X2m-IC-J1u" secondAttribute="leading" id="rvD-u3-Dug"/>
+                                    <constraint firstItem="8Cj-cK-AKZ" firstAttribute="top" secondItem="iSO-mc-0TB" secondAttribute="bottom" constant="14" id="shO-sV-GWB"/>
+                                </constraints>
+                            </view>
+                        </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="eAi-wv-a4Y" firstAttribute="bottom" secondItem="X2m-IC-J1u" secondAttribute="bottom" constant="10" id="Gvn-eF-b0b"/>
+                            <constraint firstItem="X2m-IC-J1u" firstAttribute="leading" secondItem="eAi-wv-a4Y" secondAttribute="leading" constant="5" id="Ufw-7y-DMv"/>
+                            <constraint firstItem="X2m-IC-J1u" firstAttribute="top" secondItem="eAi-wv-a4Y" secondAttribute="top" constant="200" id="aXO-v9-CBF"/>
+                            <constraint firstItem="eAi-wv-a4Y" firstAttribute="trailing" secondItem="X2m-IC-J1u" secondAttribute="trailing" constant="5" id="hVX-vu-qJn"/>
+                        </constraints>
                         <viewLayoutGuide key="safeArea" id="eAi-wv-a4Y"/>
                     </view>
+                    <connections>
+                        <outlet property="addShareLinkButton" destination="Qek-aQ-NjE" id="SKs-18-AzY"/>
+                        <outlet property="returnSearchButton" destination="f5j-bG-pbj" id="Frk-T3-NV9"/>
+                        <outlet property="searchField" destination="iSO-mc-0TB" id="1vY-Js-dGQ"/>
+                        <outlet property="shareLinkImage" destination="8Cj-cK-AKZ" id="dIZ-nv-gyf"/>
+                        <outlet property="shareLinkLabel" destination="SQW-aQ-ydN" id="nBK-WJ-oKy"/>
+                        <outlet property="viewContainerConstraint" destination="aXO-v9-CBF" id="R19-WO-im5"/>
+                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="4Te-U6-4XT" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="2235" y="404"/>
+            <point key="canvasLocation" x="2234.7826086956525" y="403.79464285714283"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="add" width="25" height="25"/>
+        <image name="arrowRight" width="329" height="329"/>
+    </resources>
 </document>

+ 16 - 1
iOSClient/Share/NCShare.swift

@@ -93,7 +93,10 @@ extension NCSharePaging: PagingViewControllerDataSource {
             viewController.metadata = metadata!
             return viewController
         case 2:
-            return UIStoryboard(name: "NCShare", bundle: nil).instantiateViewController(withIdentifier: "sharing")
+            let viewController = UIStoryboard(name: "NCShare", bundle: nil).instantiateViewController(withIdentifier: "sharing") as! NCShare
+            viewController.metadata = metadata!
+            viewController.height = height
+            return viewController
         default:
             return UIViewController()
         }
@@ -231,9 +234,21 @@ class NCShare: UIViewController {
     
     var metadata: tableMetadata?
     private let appDelegate = UIApplication.shared.delegate as! AppDelegate
+    var height: CGFloat = 0
     
+    @IBOutlet weak var viewContainerConstraint: NSLayoutConstraint!
+    @IBOutlet weak var searchField: UITextField!
+    @IBOutlet weak var returnSearchButton: UIButton!
+    @IBOutlet weak var shareLinkImage: UIImageView!
+    @IBOutlet weak var shareLinkLabel: UILabel!
+    @IBOutlet weak var addShareLinkButton: UIButton!
+
     override func viewDidLoad() {
         super.viewDidLoad()
         
+        viewContainerConstraint.constant = height
+        
+        returnSearchButton.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "arrowRight"), width: 40, height: 40, color: NCBrandColor.sharedInstance.textInfo), for: .normal)
+
     }
 }