         window.isHidden = false
         window.addSubview(view)
         windows.append(window)
-        
-        if autoClear {
-            let selector = #selector(SwiftNotice.hideNotice(_:))
-            self.perform(selector, with: window, afterDelay: TimeInterval(autoClearTime))
-        }
+      
+        var origPoint = view.frame.origin
+        origPoint.y = -(view.frame.size.height)
+        let destPoint = view.frame.origin
+        view.tag = sn_topBar
+      
+        view.frame = CGRect(origin: origPoint, size: view.frame.size)
+        UIView.animate(withDuration: 0.3, animations: {
+          view.frame = CGRect(origin: destPoint, size: view.frame.size)
+        }, completion: { b in
+          if autoClear {
+              let selector = #selector(SwiftNotice.hideNotice(_:))
+              self.perform(selector, with: window, afterDelay: TimeInterval(autoClearTime))
+          }
+        })
+      
     }
     static func wait(_ imageNames: Array<UIImage> = Array<UIImage>(), timeInterval: Int = 0) {
         let frame = CGRect(x: 0, y: 0, width: 78, height: 78)


import Foundation
import UIKit

extension UIResponder {
    /// wait with your own animated images

        window.isHidden = false
        window.addSubview(mainView)
        windows.append(window)
      
        mainView.alpha = 0.0
        UIView.animate(withDuration: 0.2, animations: {
          mainView.alpha = 1
        })
      
        if autoClear {
            let selector = #selector(SwiftNotice.hideNotice(_:))
            self.perform(selector, with: window, afterDelay: TimeInterval(autoClearTime))
        }
    }
  
    // fix https://github.com/johnlui/SwiftNotice/issues/2
    static func hideNotice(_ sender: AnyObject) {
        if let window = sender as? UIWindow {
          
          if let v = window.subviews.first {
            UIView.animate(withDuration: 0.2, animations: {
              
              if v.tag == sn_topBar {
                v.frame = CGRect(x: 0, y: -v.frame.height, width: v.frame.width, height: v.frame.height)
              }
              v.alpha = 0
            }, completion: { b in
              
              if let index = windows.index(where: { (item) -> Bool in
                  return item == window
              }) {
                  windows.remove(at: index)
              }
            })
          }
          
        }
    }
    
