marinofaggiana 4 жил өмнө
parent
commit
b22d4a565f

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

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

BIN
iOSClient/Images.xcassets/closeVideo.imageset/closeVideo.pdf


+ 8 - 6
iOSClient/Viewer/NCViewerImage/NCViewerImageVideo.storyboard

@@ -18,19 +18,20 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U2u-Ng-quR">
-                                <rect key="frame" x="0.0" y="69" width="414" height="773"/>
+                                <rect key="frame" x="0.0" y="79" width="414" height="763"/>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </view>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oHy-h6-oBZ">
-                                <rect key="frame" x="8" y="20" width="45" height="26"/>
+                                <rect key="frame" x="8" y="30" width="45" height="26"/>
                                 <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QdX-GD-p2D">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QdX-GD-p2D">
                                         <rect key="frame" x="11.5" y="2" width="22" height="22"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="22" id="dQc-qo-agC"/>
                                             <constraint firstAttribute="width" constant="22" id="xnb-gI-bEr"/>
                                         </constraints>
-                                        <state key="normal">
+                                        <color key="tintColor" systemColor="systemGrayColor"/>
+                                        <state key="normal" image="closeVideo">
                                             <color key="titleColor" systemColor="systemGrayColor"/>
                                         </state>
                                         <connections>
@@ -50,10 +51,10 @@
                         <viewLayoutGuide key="safeArea" id="I8r-2q-gEp"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
-                            <constraint firstItem="U2u-Ng-quR" firstAttribute="top" secondItem="I8r-2q-gEp" secondAttribute="top" constant="25" id="JMx-LP-euj"/>
+                            <constraint firstItem="U2u-Ng-quR" firstAttribute="top" secondItem="I8r-2q-gEp" secondAttribute="top" constant="35" id="JMx-LP-euj"/>
                             <constraint firstItem="I8r-2q-gEp" firstAttribute="bottom" secondItem="U2u-Ng-quR" secondAttribute="bottom" constant="20" id="OB5-oL-uWd"/>
                             <constraint firstItem="oHy-h6-oBZ" firstAttribute="leading" secondItem="ZUd-xF-jbc" secondAttribute="leading" constant="8" id="V0z-bW-qho"/>
-                            <constraint firstItem="oHy-h6-oBZ" firstAttribute="top" secondItem="ZUd-xF-jbc" secondAttribute="top" constant="20" id="WU4-yL-oxZ"/>
+                            <constraint firstItem="oHy-h6-oBZ" firstAttribute="top" secondItem="ZUd-xF-jbc" secondAttribute="top" constant="30" id="WU4-yL-oxZ"/>
                             <constraint firstAttribute="trailing" secondItem="U2u-Ng-quR" secondAttribute="trailing" id="fK9-2n-mIB"/>
                             <constraint firstItem="U2u-Ng-quR" firstAttribute="leading" secondItem="ZUd-xF-jbc" secondAttribute="leading" id="zBR-Jl-ZtK"/>
                         </constraints>
@@ -70,6 +71,7 @@
         </scene>
     </scenes>
     <resources>
+        <image name="closeVideo" width="425" height="425"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 1 - 4
iOSClient/Viewer/NCViewerImage/NCViewerImageVideo.swift

@@ -43,10 +43,7 @@ class NCViewerImageVideo: UIViewController {
         view.backgroundColor = .black
         
         closeView.layer.cornerRadius = 7
-        closeView.backgroundColor = .yellow
-        
-        let image = CCGraphics.changeThemingColorImage(UIImage(named: "exit"), width: 50, height: 50, color: .black)
-        closeButton.setImage(image, for: .normal)
+        closeView.backgroundColor = UIColor(red: 36.0/255.0, green: 36.0/255.0, blue: 36.0/255.0, alpha: 1.0)
         
         NCViewerVideoCommon.shared.viewMedia(metadata, view: videoView, frame: CGRect(x: 0, y: 0, width: videoView.frame.width, height: videoView.frame.height))
     }

+ 4 - 4
iOSClient/Viewer/NCViewerVideo/NCViewerVideo.storyboard

@@ -3,7 +3,7 @@
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -18,21 +18,21 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U2u-Ng-quR">
-                                <rect key="frame" x="0.0" y="49" width="414" height="837"/>
+                                <rect key="frame" x="0.0" y="44" width="414" height="842"/>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </view>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="I8r-2q-gEp"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
-                            <constraint firstItem="U2u-Ng-quR" firstAttribute="top" secondItem="I8r-2q-gEp" secondAttribute="top" constant="5" id="JMx-LP-euj"/>
+                            <constraint firstItem="U2u-Ng-quR" firstAttribute="top" secondItem="I8r-2q-gEp" secondAttribute="top" id="JMx-LP-euj"/>
                             <constraint firstAttribute="bottom" secondItem="U2u-Ng-quR" secondAttribute="bottom" constant="10" id="OB5-oL-uWd"/>
                             <constraint firstAttribute="trailing" secondItem="U2u-Ng-quR" secondAttribute="trailing" id="fK9-2n-mIB"/>
                             <constraint firstItem="U2u-Ng-quR" firstAttribute="leading" secondItem="ZUd-xF-jbc" secondAttribute="leading" id="zBR-Jl-ZtK"/>
                         </constraints>
                     </view>
                     <connections>
-                        <outlet property="backgroundView" destination="U2u-Ng-quR" id="f7b-ke-Ojf"/>
+                        <outlet property="videoView" destination="U2u-Ng-quR" id="GFR-GE-i2N"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="gwo-1E-fE5" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>

+ 2 - 3
iOSClient/Viewer/NCViewerVideo/NCViewerVideo.swift

@@ -26,7 +26,7 @@ import Foundation
 
 class NCViewerVideo: UIViewController {
     
-    @IBOutlet weak var backgroundView: UIView!
+    @IBOutlet weak var videoView: UIView!
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     var metadata = tableMetadata()
@@ -44,8 +44,7 @@ class NCViewerVideo: UIViewController {
         NotificationCenter.default.addObserver(self, selector: #selector(viewUnload), name: NSNotification.Name(rawValue: k_notificationCenter_menuDetailClose), object: nil)
         
         view.backgroundColor = .black
-        let frame = CGRect(x: 0, y: 0, width: backgroundView.frame.width, height: backgroundView.frame.height)
-        NCViewerVideoCommon.shared.viewMedia(metadata, view: backgroundView, frame: frame)
+        NCViewerVideoCommon.shared.viewMedia(metadata, view: videoView, frame: CGRect(x: 0, y: 0, width: videoView.frame.width, height: videoView.frame.height))
     }
     
     override func viewWillAppear(_ animated: Bool) {