         }
     }
     
+    func toggleError(message: String?) {
+        if let message = message {
+            errorMessage = message
+            errorLabel.text = message
+            errorStackView.hidden = false
+            loadingStackView.hidden = true
+        } else {
+            errorMessage = nil
+            loadingStackView.hidden = false
+            errorStackView.hidden = true
+        }
+    }
+    
+    func showBanner() {
+        showing = true
+        toggleBanner()
+    }
+    
     
     // MARK: - Initial setup
     

        didSet {
            heightConstraint.constant = height
            layoutIfNeeded()
        }
    }
    
    @IBInspectable public var loadingText: String = "Loading…" {
        didSet {
            loadingLabel.text = loadingText
        }
    }
    

    private var showing = false
    
    
    // MARK: - Constants
    
    private let defaultLoadingText = "Loading…"
    
    
    // MARK: - Initializers
    
    override public init(frame: CGRect) {
