瀏覽代碼

improved animations

nayooti 5 年之前
父節點
當前提交
887a116e44
共有 1 個文件被更改,包括 3 次插入3 次删除
  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) {
-        UIView.animate(withDuration: animated ? 0 : 0.2) {
+        UIView.animate(withDuration: animated ? 0.2 : 0) {
             self.alpha = 1
         }
     }
 
     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
-        }
+        })
     }
 }