Browse Source

improvements

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 year ago
parent
commit
f85c57e987
1 changed files with 6 additions and 4 deletions
  1. 6 4
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

+ 6 - 4
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -68,8 +68,6 @@ class NCPlayerToolBar: UIView {
     override func awakeFromNib() {
         super.awakeFromNib()
 
-        backgroundColor = UIColor.black.withAlphaComponent(0.1)
-
         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)
@@ -177,19 +175,23 @@ class NCPlayerToolBar: UIView {
 
     public func show() {
 
-        UIView.animate(withDuration: 0.3, animations: {
+        UIView.animate(withDuration: 0.6, animations: {
+            self.backgroundColor = UIColor.black
             self.alpha = 1
         }, completion: { (_: Bool) in
             self.isHidden = false
+            self.backgroundColor = UIColor.black.withAlphaComponent(0.1)
         })
     }
 
     func hide() {
 
-        UIView.animate(withDuration: 0.3, animations: {
+        UIView.animate(withDuration: 0.6, animations: {
             self.alpha = 0
+            self.backgroundColor = UIColor.black.withAlphaComponent(0.1)
         }, completion: { (_: Bool) in
             self.isHidden = true
+            self.backgroundColor = UIColor.black
         })
     }