浏览代码

improvements

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 年之前
父节点
当前提交
7184f6f010
共有 1 个文件被更改,包括 5 次插入7 次删除
  1. 5 7
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

+ 5 - 7
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -68,6 +68,8 @@ class NCPlayerToolBar: UIView {
     override func awakeFromNib() {
         super.awakeFromNib()
 
+        self.backgroundColor = UIColor.black
+
         fullscreenButton.setImage(NCUtility.shared.loadImage(named: "arrow.up.left.and.arrow.down.right", color: .white), for: .normal)
 
         subtitleButton.setImage(NCUtility.shared.loadImage(named: "captions.bubble", color: .white), for: .normal)
@@ -175,23 +177,19 @@ class NCPlayerToolBar: UIView {
 
     public func show() {
 
-        UIView.animate(withDuration: 0.6, animations: {
-            self.backgroundColor = UIColor.black
-            self.alpha = 1
+        UIView.animate(withDuration: 0.5, animations: {
+            self.alpha = 0.1
         }, completion: { (_: Bool) in
             self.isHidden = false
-            self.backgroundColor = UIColor.black.withAlphaComponent(0.1)
         })
     }
 
     func hide() {
 
-        UIView.animate(withDuration: 0.6, animations: {
+        UIView.animate(withDuration: 0.5, animations: {
             self.alpha = 0
-            self.backgroundColor = UIColor.black.withAlphaComponent(0.1)
         }, completion: { (_: Bool) in
             self.isHidden = true
-            self.backgroundColor = UIColor.black
         })
     }