marinofaggiana 3 жил өмнө
parent
commit
0e0571163f

+ 9 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -920,6 +920,14 @@
 			path = BackgroundImageColor;
 			sourceTree = "<group>";
 		};
+		F70D08D7270F3A4B0023FC25 /* Zzz */ = {
+			isa = PBXGroup;
+			children = (
+				F744583B270DCFD50004631B /* NCViewerMediaDetailView.xib */,
+			);
+			path = Zzz;
+			sourceTree = "<group>";
+		};
 		F70D87CC25EE6E58008CBBBD /* Rename file */ = {
 			isa = PBXGroup;
 			children = (
@@ -1183,7 +1191,6 @@
 				F70753F62542A9C000972D44 /* NCViewerMedia.storyboard */,
 				F70753EA2542A99800972D44 /* NCViewerMedia.swift */,
 				F718C24D254D507B00C5C256 /* NCViewerMediaDetailView.swift */,
-				F744583B270DCFD50004631B /* NCViewerMediaDetailView.xib */,
 				F70753F02542A9A200972D44 /* NCViewerMediaZoom.swift */,
 			);
 			path = NCViewerMedia;
@@ -1525,6 +1532,7 @@
 				F7A0D14E259229FA008F8A13 /* Extensions */,
 				F7BFFA991A24D7BB0044ED85 /* Utility */,
 				F79630EC215526B60015EEA5 /* Viewer */,
+				F70D08D7270F3A4B0023FC25 /* Zzz */,
 			);
 			path = iOSClient;
 			sourceTree = "<group>";

+ 21 - 22
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.storyboard

@@ -97,7 +97,7 @@
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P8R-4f-zAl" customClass="NCViewerMediaDetailView" customModule="Nextcloud" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="336" width="414" height="352"/>
+                                        <rect key="frame" x="0.0" y="336" width="414" height="400"/>
                                         <subviews>
                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HRq-3M-yeb">
                                                 <rect key="frame" x="15" y="20" width="384" height="1"/>
@@ -151,20 +151,6 @@
                                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <nil key="highlightedColor"/>
                                             </label>
-                                            <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="Typ-A8-XIO">
-                                                <rect key="frame" x="15" y="150" width="384" height="174"/>
-                                                <constraints>
-                                                    <constraint firstAttribute="height" constant="174" id="VRv-eR-bwo"/>
-                                                </constraints>
-                                            </mapView>
-                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oov-9f-Oeu">
-                                                <rect key="frame" x="15" y="324" width="384" height="28"/>
-                                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                                <state key="normal" title="location"/>
-                                                <connections>
-                                                    <action selector="touchLocation:" destination="P8R-4f-zAl" eventType="touchUpInside" id="Z9s-pM-WsS"/>
-                                                </connections>
-                                            </button>
                                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="lens" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uYI-ic-d8g">
                                                 <rect key="frame" x="15" y="114" width="80" height="16"/>
                                                 <constraints>
@@ -189,6 +175,18 @@
                                                 <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <nil key="highlightedColor"/>
                                             </label>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dJP-ZX-iug">
+                                                <rect key="frame" x="15" y="150" width="384" height="222"/>
+                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            </view>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oov-9f-Oeu">
+                                                <rect key="frame" x="15" y="372" width="384" height="28"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                                <state key="normal" title="location"/>
+                                                <connections>
+                                                    <action selector="touchLocation:" destination="P8R-4f-zAl" eventType="touchUpInside" id="Z9s-pM-WsS"/>
+                                                </connections>
+                                            </button>
                                         </subviews>
                                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <constraints>
@@ -197,12 +195,15 @@
                                             <constraint firstItem="XLb-0a-du9" firstAttribute="centerY" secondItem="WXS-Lw-DkI" secondAttribute="centerY" id="6k5-Ur-AKZ"/>
                                             <constraint firstAttribute="trailing" secondItem="n1C-OB-gq2" secondAttribute="trailing" constant="15" id="6o9-lb-LZc"/>
                                             <constraint firstItem="03V-nM-JHv" firstAttribute="top" secondItem="uYI-ic-d8g" secondAttribute="bottom" constant="5" id="7Uh-9y-EY1"/>
+                                            <constraint firstAttribute="trailing" secondItem="dJP-ZX-iug" secondAttribute="trailing" constant="15" id="AbM-Mc-iC7"/>
                                             <constraint firstAttribute="trailing" secondItem="HRq-3M-yeb" secondAttribute="trailing" constant="15" id="DIq-e4-T4P"/>
+                                            <constraint firstAttribute="height" constant="400" id="HzF-N7-BQ8"/>
                                             <constraint firstItem="XLb-0a-du9" firstAttribute="leading" secondItem="WXS-Lw-DkI" secondAttribute="trailing" constant="10" id="Iqg-lN-NpB"/>
                                             <constraint firstItem="n1C-OB-gq2" firstAttribute="centerY" secondItem="uaE-Lv-t0Q" secondAttribute="centerY" id="KMX-7y-YXP"/>
                                             <constraint firstItem="uYI-ic-d8g" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="MTM-eQ-CXC"/>
-                                            <constraint firstItem="oov-9f-Oeu" firstAttribute="top" secondItem="Typ-A8-XIO" secondAttribute="bottom" id="MUo-UC-1d4"/>
+                                            <constraint firstItem="dJP-ZX-iug" firstAttribute="top" secondItem="ix8-uQ-chU" secondAttribute="bottom" constant="20" id="Mxt-43-sew"/>
                                             <constraint firstItem="ix8-uQ-chU" firstAttribute="centerY" secondItem="uYI-ic-d8g" secondAttribute="centerY" id="Oae-3R-C5Z"/>
+                                            <constraint firstItem="oov-9f-Oeu" firstAttribute="top" secondItem="dJP-ZX-iug" secondAttribute="bottom" id="SXt-nb-5Bf"/>
                                             <constraint firstAttribute="trailing" secondItem="ix8-uQ-chU" secondAttribute="trailing" constant="15" id="TIp-le-wVn"/>
                                             <constraint firstItem="hBd-KD-Jq5" firstAttribute="centerY" secondItem="Son-CZ-zFa" secondAttribute="centerY" id="Tez-na-gqC"/>
                                             <constraint firstItem="HRq-3M-yeb" firstAttribute="top" secondItem="P8R-4f-zAl" secondAttribute="top" constant="20" id="UF1-fO-9hX"/>
@@ -212,11 +213,9 @@
                                             <constraint firstItem="hBd-KD-Jq5" firstAttribute="leading" secondItem="Son-CZ-zFa" secondAttribute="trailing" constant="10" id="YuO-13-KTh"/>
                                             <constraint firstItem="WXS-Lw-DkI" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="bRd-bi-Imh"/>
                                             <constraint firstItem="uYI-ic-d8g" firstAttribute="top" secondItem="uaE-Lv-t0Q" secondAttribute="bottom" constant="10" id="bkM-Ic-ZoE"/>
-                                            <constraint firstItem="Typ-A8-XIO" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="jre-DM-hm3"/>
+                                            <constraint firstItem="dJP-ZX-iug" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="ife-ps-Lx5"/>
                                             <constraint firstItem="oov-9f-Oeu" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="lXY-IM-uQB"/>
                                             <constraint firstAttribute="trailing" secondItem="oov-9f-Oeu" secondAttribute="trailing" constant="15" id="mpQ-4V-Yfc"/>
-                                            <constraint firstAttribute="trailing" secondItem="Typ-A8-XIO" secondAttribute="trailing" constant="15" id="nAm-fh-5Px"/>
-                                            <constraint firstItem="Typ-A8-XIO" firstAttribute="top" secondItem="ix8-uQ-chU" secondAttribute="bottom" constant="20" id="o5C-6S-80Q"/>
                                             <constraint firstItem="HRq-3M-yeb" firstAttribute="leading" secondItem="P8R-4f-zAl" secondAttribute="leading" constant="15" id="oJB-7U-UpU"/>
                                             <constraint firstAttribute="trailing" secondItem="XLb-0a-du9" secondAttribute="trailing" constant="15" id="p7C-ox-HFw"/>
                                             <constraint firstAttribute="trailing" secondItem="hBd-KD-Jq5" secondAttribute="trailing" constant="15" id="sKA-YA-3Uc"/>
@@ -234,8 +233,7 @@
                                             <outlet property="lensModelLabel" destination="uYI-ic-d8g" id="DUn-uJ-sVj"/>
                                             <outlet property="lensModelValue" destination="ix8-uQ-chU" id="GNF-8F-10P"/>
                                             <outlet property="locationButton" destination="oov-9f-Oeu" id="cGg-Gb-m5S"/>
-                                            <outlet property="mapHeightConstraint" destination="VRv-eR-bwo" id="jXn-vm-aJk"/>
-                                            <outlet property="mapView" destination="Typ-A8-XIO" id="XCg-a6-NUq"/>
+                                            <outlet property="mapContainer" destination="dJP-ZX-iug" id="9xS-le-Hhe"/>
                                             <outlet property="messageLabel" destination="03V-nM-JHv" id="dpK-Iy-LCD"/>
                                             <outlet property="separator" destination="HRq-3M-yeb" id="ENP-xc-AWZ"/>
                                             <outlet property="sizeLabel" destination="WXS-Lw-DkI" id="JG0-G0-oHg"/>
@@ -383,7 +381,8 @@
                     </view>
                     <connections>
                         <outlet property="detailView" destination="P8R-4f-zAl" id="xFW-qq-Cdi"/>
-                        <outlet property="detailViewConstraint" destination="bor-cg-Alz" id="Hwu-z8-2SS"/>
+                        <outlet property="detailViewHeighConstraint" destination="HzF-N7-BQ8" id="KE0-MF-H7w"/>
+                        <outlet property="detailViewTopConstraint" destination="bor-cg-Alz" id="xcM-bF-u7e"/>
                         <outlet property="imageVideoContainer" destination="kPV-JM-UnM" id="2pA-VW-FuK"/>
                         <outlet property="imageViewBottomConstraint" destination="vEd-X2-yGs" id="wp3-67-aZ2"/>
                         <outlet property="imageViewTopConstraint" destination="tdo-XY-uqv" id="AM2-tz-fSt"/>

+ 0 - 3
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

@@ -178,9 +178,6 @@ class NCViewerMedia: UIViewController {
         if currentViewController.metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue {
             saveScreenModeImage = mode
         }
-        
-        // Detail Text Color
-        currentViewController.detailView.textColor(textColor)
     }
     
     //MARK: - NotificationCenter

+ 88 - 112
iOSClient/Viewer/NCViewerMedia/NCViewerMediaDetailView.swift

@@ -37,24 +37,17 @@ class NCViewerMediaDetailView: UIView {
     @IBOutlet weak var lensModelLabel: UILabel!
     @IBOutlet weak var lensModelValue: UILabel!
     @IBOutlet weak var messageLabel: UILabel!
-    @IBOutlet weak var mapHeightConstraint: NSLayoutConstraint!
-    @IBOutlet weak var mapView: MKMapView!
+    @IBOutlet weak var mapContainer: UIView!
     @IBOutlet weak var locationButton: UIButton!
-
-    var metadata: tableMetadata?
     
     var latitude: Double = 0
     var longitude: Double = 0
     var location: String?
-    var date: NSDate?
-    var lensModel: String?
-    var heightMap: CGFloat = 0
-    var size: Int64 = 0
-    var image: UIImage?
-    
+        
     override func awakeFromNib() {
         super.awakeFromNib()
            
+        separator.backgroundColor = NCBrandColor.shared.separator
         sizeLabel.text = ""
         sizeValue.text = ""
         dateLabel.text = ""
@@ -70,124 +63,107 @@ class NCViewerMediaDetailView: UIView {
     
     deinit {
         print("deinit NCViewerMediaDetailView")
-        
-        mapView.delegate = nil
-    }
-    
-    func textColor(_ textColor: UIColor?) {
-        sizeValue.textColor = textColor
-        dateValue.textColor = textColor
-        dimValue.textColor = textColor
-        lensModelValue.textColor = textColor
-        separator.backgroundColor = NCBrandColor.shared.separator
-    }
-    
-    func show(textColor: UIColor?) {
-        self.textColor(textColor)
-        isHidden = false
-    }
-    
-    func hide() {
-        isHidden = true
-    }
-    
-    func isShow() -> Bool {
-        return !isHidden
     }
     
-    //MARK: - EXIF
-    
-    func update(metadata: tableMetadata, image: UIImage?, heightMap:  CGFloat) {
-                    
-        self.metadata = metadata
-        self.heightMap = heightMap
-        self.image = image
-        self.size = metadata.size
+    func show(metadata: tableMetadata, image: UIImage?, textColor: UIColor?, detailView: UIView) {
+                        
+        func updateContent(date: Date?, lensModel: String?, location: String?) {
+            
+            // Size
+            sizeLabel.text = NSLocalizedString("_size_", comment: "")
+            sizeValue.text = CCUtility.transformedSize(metadata.size)
+            sizeValue.textColor = textColor
+            
+            // Date
+            if let date = date {
+                let formatter = DateFormatter()
+                formatter.dateStyle = .full
+                formatter.timeStyle = .medium
+                let dateString = formatter.string(from: date as Date)
+                
+                dateLabel.text = NSLocalizedString("_date_", comment: "")
+                dateValue.text = dateString
+            } else {
+                dateLabel.text = NSLocalizedString("_date_", comment: "")
+                dateValue.text = NSLocalizedString("_not_available_", comment: "")
+            }
+            dateValue.textColor = textColor
+
+            
+            // Dimension / Duration
+            if metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue {
+                if let image = image {
+                    dimLabel.text = NSLocalizedString("_resolution_", comment: "")
+                    dimValue.text = "\(Int(image.size.width)) x \(Int(image.size.height))"
+                }
+            } else if metadata.classFile == NCCommunicationCommon.typeClassFile.video.rawValue || metadata.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue  {
+                if let durationTime = NCManageDatabase.shared.getVideoDurationTime(metadata: metadata) {
+                    self.dimLabel.text = NSLocalizedString("_duration_", comment: "")
+                    self.dimValue.text = NCUtility.shared.stringFromTime(durationTime)
+                }
+            }
+            dimValue.textColor = textColor
+
+            // Model
+            if let lensModel = lensModel {
+                lensModelLabel.text = NSLocalizedString("_model_", comment: "")
+                lensModelValue.text = lensModel
+                lensModelValue.textColor = textColor
+            }
+            
+            // Message
+            if metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue && !CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && metadata.session == "" {
+                messageLabel.text = NSLocalizedString("_try_download_full_resolution_", comment: "")
+            } else {
+                messageLabel.text = ""
+            }
+            
+            // Location
+            if let location = location {
+                self.locationButton.setTitle(location, for: .normal)
+            }
+        }
         
         if metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue {
             CCUtility.setExif(metadata) { (latitude, longitude, location, date, lensModel) in
-                
+            
                 self.latitude = latitude
                 self.longitude = longitude
                 self.location = location
-                self.date = date as NSDate?
-                self.lensModel = lensModel
                 
-                self.updateContent()
+                if latitude != -1 && latitude != 0 && longitude != -1 && longitude != 0 {
+                                        
+                    let annotation = MKPointAnnotation()
+                    annotation.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
+                    
+                    let mapView = MKMapView.init(frame: self.frame)
+                    mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+                    mapView.layer.cornerRadius = 6
+                    mapView.isZoomEnabled = false
+                    mapView.isScrollEnabled = false
+                    mapView.isUserInteractionEnabled = false
+                    mapView.addAnnotation(annotation)
+                    mapView.setRegion(MKCoordinateRegion(center: annotation.coordinate, latitudinalMeters: 500, longitudinalMeters: 500), animated: false)
+                    self.addSubview(mapView)
+                }
+                
+                updateContent(date: date, lensModel: lensModel, location: location)
+                self.isHidden = false
             };
         } else {
-            self.updateContent()
+            updateContent(date: nil, lensModel: nil, location: nil)
+            self.isHidden = false
         }
     }
     
-    //MARK: - Map
-    
-    func updateContent() {
-        
-        // Size
-        sizeLabel.text = NSLocalizedString("_size_", comment: "")
-        sizeValue.text = CCUtility.transformedSize(self.size)
-        
-        // Date
-        if let date = self.date {
-            let formatter = DateFormatter()
-            formatter.dateStyle = .full
-            formatter.timeStyle = .medium
-            let dateString = formatter.string(from: date as Date)
-            
-            dateLabel.text = NSLocalizedString("_date_", comment: "")
-            dateValue.text = dateString
-        } else {
-            dateLabel.text = NSLocalizedString("_date_", comment: "")
-            dateValue.text = NSLocalizedString("_not_available_", comment: "")
-        }
-        
-        // Dimension / Duration
-        if metadata?.classFile == NCCommunicationCommon.typeClassFile.image.rawValue {
-            if let image = self.image {
-                dimLabel.text = NSLocalizedString("_resolution_", comment: "")
-                dimValue.text = "\(Int(image.size.width)) x \(Int(image.size.height))"
-            }
-        } else if metadata?.classFile == NCCommunicationCommon.typeClassFile.video.rawValue || metadata?.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue  {
-            if let durationTime = NCManageDatabase.shared.getVideoDurationTime(metadata: metadata) {
-                self.dimLabel.text = NSLocalizedString("_duration_", comment: "")
-                self.dimValue.text = NCUtility.shared.stringFromTime(durationTime)
-            }
-        }
-        
-        // Model
-        if let lensModel = self.lensModel {
-            lensModelLabel.text = NSLocalizedString("_model_", comment: "")
-            lensModelValue.text = lensModel
-        }
-        
-        // Message
-        if let metadata = self.metadata, metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue && !CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && metadata.session == "" {
-            messageLabel.text = NSLocalizedString("_try_download_full_resolution_", comment: "")
-        } else {
-            messageLabel.text = ""
-        }
-        
-        // Map
-        if latitude != -1 && latitude != 0 && longitude != -1 && longitude != 0 {
-            
-            let annotation = MKPointAnnotation()
-            annotation.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
-            mapView.layer.cornerRadius = 6
-            mapView.isZoomEnabled = false
-            mapView.isScrollEnabled = false
-            mapView.isUserInteractionEnabled = false
-            mapView.addAnnotation(annotation)
-            mapView.setRegion(MKCoordinateRegion(center: annotation.coordinate, latitudinalMeters: 500, longitudinalMeters: 500), animated: false)
-            locationButton.setTitle(location, for: .normal)
-            mapHeightConstraint.constant = self.heightMap
-            
-        } else {
-            
-            mapHeightConstraint.constant = 0
-        }
+    func hide() {
+        self.isHidden = true
     }
     
+    func isShow() -> Bool {
+        return !self.isHidden
+    }
+        
     //MARK: - Action
 
     @IBAction func touchLocation(_ sender: Any) {

+ 9 - 9
iOSClient/Viewer/NCViewerMedia/NCViewerMediaZoom.swift

@@ -26,10 +26,10 @@ import NCCommunication
 
 class NCViewerMediaZoom: UIViewController {
     
-    @IBOutlet weak var detailViewConstraint: NSLayoutConstraint!
+    @IBOutlet weak var detailViewTopConstraint: NSLayoutConstraint!
+    @IBOutlet weak var detailViewHeighConstraint: NSLayoutConstraint!
     @IBOutlet weak var imageViewTopConstraint: NSLayoutConstraint!
     @IBOutlet weak var imageViewBottomConstraint: NSLayoutConstraint!
-    
     @IBOutlet weak var scrollView: UIScrollView!
     @IBOutlet weak var imageVideoContainer: imageVideoContainerView!
     @IBOutlet weak var statusViewImage: UIImageView!
@@ -99,7 +99,6 @@ class NCViewerMediaZoom: UIViewController {
             statusLabel.text = ""
         }
         
-        detailViewConstraint.constant = 0
         detailView.hide()
     }
     
@@ -219,11 +218,12 @@ class NCViewerMediaZoom: UIViewController {
             
             // gesture moving Up
             if velocity.y < 0 {
-                var heightMap = (view.bounds.height / 3)
+                var heightDetailView = (view.bounds.height / 2)
                 if view.bounds.width < view.bounds.height {
-                    heightMap = (view.bounds.width / 3)
+                    heightDetailView = (view.bounds.width / 2)
                 }
-                detailView.update(metadata: metadata, image: image, heightMap: heightMap)
+                detailViewHeighConstraint.constant = heightDetailView
+                //detailView.update(metadata: metadata, image: image)
             }
 
         case .ended:
@@ -274,7 +274,7 @@ extension NCViewerMediaZoom {
     
     private func openDetail() {
         
-        self.detailView.show(textColor: self.viewerMedia?.textColor)
+        self.detailView.show(metadata: metadata, image: image, textColor: self.viewerMedia?.textColor, detailView: self.detailView)
         
         if let image = imageVideoContainer.image {
             let ratioW = imageVideoContainer.frame.width / image.size.width
@@ -288,7 +288,7 @@ extension NCViewerMediaZoom {
         UIView.animate(withDuration: 0.3) {
             self.imageViewTopConstraint.constant = -self.imageViewConstraint
             self.imageViewBottomConstraint.constant = self.imageViewConstraint
-            self.detailViewConstraint.constant = self.detailView.frame.height
+            self.detailViewTopConstraint.constant = self.detailView.frame.height
             self.view.layoutIfNeeded()
         } completion: { (_) in
         }
@@ -306,7 +306,7 @@ extension NCViewerMediaZoom {
         UIView.animate(withDuration: 0.3) {
             self.imageViewTopConstraint.constant = 0
             self.imageViewBottomConstraint.constant = 0
-            self.detailViewConstraint.constant = 0
+            self.detailViewTopConstraint.constant = 0
             self.view.layoutIfNeeded()
         } completion: { (_) in
         }

+ 0 - 0
iOSClient/Viewer/NCViewerMedia/NCViewerMediaDetailView.xib → iOSClient/Zzz/NCViewerMediaDetailView.xib