     }
 
     @IBOutlet private weak var messageLabel: UILabel!
+    @IBOutlet weak var messageButton: UIButton!
+    @IBOutlet weak var closeButton: UIButton!
     private var underStatusBarView: UIView!
     public static var sharedToolbar: NotificationBanner = {
-        let bundle = NSBundle(forClass: NotificationBanner.classForCoder())
-        let t = bundle.loadNibNamed(String(NotificationBanner), owner: nil, options: nil).first as! NotificationBanner
-        t.hideHairlineBorder()
-        t.barTintColor = UIColor(white: 0.2, alpha: 0.4)
-        t.addStatusBarBackingView()
-        UIApplication.sharedApplication().keyWindow!.addSubview(t)
+        
+        let t = NSBundle.mainBundle().loadNibNamed(String(NotificationBanner), owner: nil, options: nil).first as! NotificationBanner
+        t.messageButton.addTarget(t, action: #selector(NotificationBanner.messageLabelTapped(_:)), forControlEvents: .TouchUpInside)
+        t.closeButton.addTarget(t, action: #selector(NotificationBanner.closeButtonTapped(_:)), forControlEvents: .TouchUpInside)
+        
+        NSNotificationCenter.defaultCenter().addObserverForName(NotificationBannerShouldDisplayErrorNotification, object: nil, queue: .mainQueue(), usingBlock: { (notification:NSNotification) in
+            
+            if let error = notification.object as? NSError {
+                NotificationBanner.showErrorMessage(error.localizedDescription)
+            } else if let errorText = notification.object as? String {
+                NotificationBanner.showErrorMessage(errorText)
+            } else {
+                NotificationBanner.showErrorMessage(.Unspecified)
+            }
+        })
+        
         return t
     }()
     

    private static var currentMessage: Message?
    private static var pendingMessages = [Message]()
    
    private static let animateDuration: NSTimeInterval = 0.3
    private class var messageShownFrame: CGRect {
        let y = UIApplication.sharedApplication().statusBarHidden ? 0 : UIApplication.sharedApplication().statusBarFrame.height
        return CGRect(x: 0, y: y, width: sharedToolbar.frame.width, height: sharedToolbar.frame.height)
    }
    private class var messageHiddenFrame: CGRect {
        return CGRect(x: 0, y: -sharedToolbar.frame.height, width: sharedToolbar.frame.width, height: sharedToolbar.frame.height)
    }
    
    required public init?(coder aDecoder: NSCoder) {

        }
    }
    
    private func styleForError(isError: Bool) {
        backgroundColor = isError ? errorBackgroundColor : regularBackgroundColor
        messageLabel.textColor = .whiteColor()
    }
    
    private func addStatusBarBackingView() {
        let underStatusBar = UIView(frame: CGRectZero)
        underStatusBar.backgroundColor = backgroundColor.colorWithAlphaComponent(0.85) //UIColor(white: 0.2, alpha: 0.85)
        underStatusBar.translatesAutoresizingMaskIntoConstraints = false
        addSubview(underStatusBar)
        let views = ["underStatusBar":underStatusBar]
