       noticeView.layer.addAnimation(animation, forKey: "slide out")
       CATransaction.commit()
     } else {
-      complete()
+      dismissed()
     }
 
   }
 
-  func noticeTouched() {
+  @objc private func noticeTouched() {
     dismissCurrentNotice()
   }
 
   public override func layoutSubviews() {
     super.layoutSubviews()
 
-    if let (noticeView, _) = currentNotice {
+    if let (noticeView, _, _) = currentNotice {
       bringSubviewToFront(noticeView)
     }
   }

      view.layer.addAnimation(animation, forKey: "slide in")
      CATransaction.commit()
    } else {
      completion?()
    }
  }

  public func dismissCurrentNotice(animated: Bool = true, completion: (() -> ())? = nil) {
    if let (noticeView, position) = self.currentNotice
      where noticeView.layer.animationForKey("slide out") == nil
    {
      dismissNotice(noticeView, position: position, animated: animated, completion: completion)
    }
  }

  public func dismissNotice(noticeView: UIView, position: NoticePosition, animated: Bool = true, completion: (() -> ())? = nil) {

    let complete: () -> () = { [weak self] in
      if let current = self?.currentNotice?.view where current == noticeView {
        current.removeFromSuperview()
        self?.currentNotice = nil
      }
      completion?()
    }

    if animated {

public class NoticeWindow : UIWindow {

  /// pending notice
  private var pendingNotice: (UIView, NoticePosition, () -> Void)?

  /// current notice view that is presented
  private var currentNotice: (view: UIView, position: NoticePosition, completion: () -> Void)?

  override public var frame: CGRect {
    didSet {

      guard
        let current = self.currentNotice,
        let noticeView = current.view as? NoticeView
        where noticeView.style.adjustTopInsetForStatusBar
      else { return }

