marinofaggiana 3 年 前
コミット
870a7c379b

+ 3 - 3
iOSClient/Viewer/NCViewerImage/NCViewerImage.storyboard

@@ -33,7 +33,7 @@
                                     <constraint firstAttribute="height" constant="1" id="F4E-lI-3jZ"/>
                                 </constraints>
                             </progressView>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JKq-ki-dtz" customClass="NCViewerVideoToolBar" customModule="Nextcloud" customModuleProvider="target">
+                            <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JKq-ki-dtz" customClass="NCViewerVideoToolBar" customModule="Nextcloud" customModuleProvider="target">
                                 <rect key="frame" x="0.0" y="64" width="414" height="798"/>
                                 <subviews>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EEV-Aj-0lu">
@@ -45,7 +45,7 @@
                                         <color key="tintColor" systemColor="labelColor"/>
                                         <state key="normal" title="Button" image="audioOn"/>
                                         <connections>
-                                            <action selector="setMute:" destination="JKq-ki-dtz" eventType="touchUpInside" id="VBj-CW-RaB"/>
+                                            <action selector="setMute:" destination="JKq-ki-dtz" eventType="touchUpInside" id="sVP-3d-utr"/>
                                         </connections>
                                     </button>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DzS-sQ-UVW">
@@ -60,7 +60,7 @@
                                                 <color key="tintColor" systemColor="labelColor"/>
                                                 <state key="normal" image="play.fill" catalog="system"/>
                                                 <connections>
-                                                    <action selector="playerPause:" destination="JKq-ki-dtz" eventType="touchUpInside" id="g2n-Lo-Kum"/>
+                                                    <action selector="playerPause:" destination="JKq-ki-dtz" eventType="touchUpInside" id="HRc-XT-ML4"/>
                                                 </connections>
                                             </button>
                                         </subviews>

+ 20 - 0
iOSClient/Viewer/NCViewerVideo/NCViewerVideoToolBar.swift

@@ -30,7 +30,27 @@ class NCViewerVideoToolBar: UIView {
     @IBOutlet weak var muteButton: UIButton!
     
     var player: AVPlayer?
+    
+    override func willMove(toWindow newWindow: UIWindow?) {
+        super.willMove(toWindow: newWindow)
 
+        if newWindow != nil {
+            
+            let blurEffect = UIBlurEffect(style: .dark)
+            let blurEffectView = UIVisualEffectView(effect: blurEffect)
+            
+            viewCommand.layer.cornerRadius = 15
+//            viewCommand.layer.borderWidth = 0.5
+//            viewCommand.layer.borderColor = UIColor.gray.cgColor
+            viewCommand.layer.masksToBounds = true
+            
+           
+            blurEffectView.frame = viewCommand.bounds
+            blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+            viewCommand.insertSubview(blurEffectView, at:0)
+        }
+    }
+    
     func setPlayer(player: AVPlayer?) {
         self.player = player
     }