                 NSLayoutConstraint(item: contentView, attribute: .bottom, relatedBy: .equal, toItem: container, attribute: .bottom, multiplier: 1.0, constant: 0.0),
                 NSLayoutConstraint(item: contentView, attribute: .leading, relatedBy: .equal, toItem: container, attribute: .leading, multiplier: 1.0, constant: 0.0),
                 NSLayoutConstraint(item: contentView, attribute: .trailing, relatedBy: .equal, toItem: container, attribute: .trailing, multiplier: 1.0, constant: 0.0),
-            ])
+                ])
 
             NSLayoutConstraint.activate(additionalConstraints)
         }
     }
 
-    override internal var backgroundColor: UIColor? {
-        didSet {
-            container.backgroundColor = backgroundColor
+    /// Proxy to the centering container `layer.cornerRadius`
+    var cornerRadius: CGFloat {
+        get {
+            return container.layer.cornerRadius
+        }
+        set {
+            container.layer.cornerRadius = newValue
+        }
+    }
+
+    @available(iOS 11.0, *)
+    var maskedCorners: CACornerMask {
+        get {
+            return container.layer.maskedCorners
+        }
+        set {
+            container.layer.maskedCorners = newValue
         }
     }
 

            trailingLessThan,
        ])
    }
}

#endif

        view.spacing = 4.0
        return view
    }()

    private var supplementalView: UIView? {
        willSet {
            if let oldView = supplementalView {
                stack.removeArrangedSubview(oldView)
                oldView.removeFromSuperview()
            }
        }
        didSet {
            if let newView = supplementalView {
                stack.insertArrangedSubview(newView, at: 0)
            }
        }
    }

    private var additionalConstraints: [NSLayoutConstraint] = []

    private func initializeSubviews() {
        backgroundColor = HUD.backgroundColor

        layer.backgroundColor = HUD.color.cgColor
        layer.borderColor = HUD.borderColor.cgColor
        layer.borderWidth = HUD.borderWidth
        layer.cornerRadius = HUD.cornerRadius
        layer.masksToBounds = true
        if #available(iOS 11.0, *) {
            layer.maskedCorners = HUD.maskedCorners
        }
        
        addSubview(stack)

        NSLayoutConstraint.activate([
            NSLayoutConstraint(item: stack, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 16.0),
            NSLayoutConstraint(item: stack, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: -12.0),
            NSLayoutConstraint(item: stack, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1.0, constant: 16.0),
            NSLayoutConstraint(item: stack, attribute: .trailing, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1.0, constant: -16.0),
        ])

        updateSubviews()
    }

    private func updateSubviews() {
        NSLayoutConstraint.deactivate(additionalConstraints)
        additionalConstraints.removeAll()

        if let value = presentation.text, !value.isEmpty {
            additionalConstraints.append(contentsOf: [
                // Without at least some constraints, the hud could potentially fill the
                // entire width that it is presented in.
                NSLayoutConstraint(item: self, attribute: .width, relatedBy: .lessThanOrEqual, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 200.0),
                NSLayoutConstraint(item: self, attribute: .width, relatedBy: .greaterThanOrEqual, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 100.0),
            ])
        }

        NSLayoutConstraint.activate(additionalConstraints)
    }
}

/// A `CenteringView`
///
/// Container that will position its _contents_ centered horizontally and vertically.
/// The contents will always be presented at its instrinsic size.
internal class CenteringView: UIView {

    var contentView: UIView? {
        willSet {
            NSLayoutConstraint.deactivate(additionalConstraints)
            additionalConstraints.removeAll()
