Jelajahi Sumber

improved animations

nayooti 5 tahun lalu
induk
melakukan
887a116e44
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      deltachat-ios/View/GalleryTimeLabel.swift

+ 3 - 3
deltachat-ios/View/GalleryTimeLabel.swift

@@ -39,14 +39,14 @@ class GalleryTimeLabel: UIView {
     }
     }
 
 
     func show(animated: Bool) {
     func show(animated: Bool) {
-        UIView.animate(withDuration: animated ? 0 : 0.2) {
+        UIView.animate(withDuration: animated ? 0.2 : 0) {
             self.alpha = 1
             self.alpha = 1
         }
         }
     }
     }
 
 
     func hide(animated: Bool) {
     func hide(animated: Bool) {
-        UIView.animate(withDuration: animated ? 0 : 0.2) {
+        UIView.animate(withDuration: animated ? 0.2 : 0, delay: animated ? 0.2 : 0, options: .curveEaseInOut, animations: {
             self.alpha = 0
             self.alpha = 0
-        }
+        })
     }
     }
 }
 }