         
         // Ensure minimum side margin is kept
         var sideContraints = [NSLayoutConstraint]()
-        sideContraints.appendContentsOf(NSLayoutConstraint.constraintsWithVisualFormat("|-(>=margin)-[bezel]-(>=margin)-|", options: [], metrics: metrics, views: ["bezelView" : bezelView!]))
-        sideContraints.appendContentsOf(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(>=margin)-[bezel]-(>=margin)-|", options: [], metrics: metrics, views: ["bezelView" : bezelView!]))
+        sideContraints.appendContentsOf(NSLayoutConstraint.constraintsWithVisualFormat("|-(>=margin)-[bezel]-(>=margin)-|", options: [], metrics: metrics, views: ["bezel" : bezelView!]))
+        sideContraints.appendContentsOf(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(>=margin)-[bezel]-(>=margin)-|", options: [], metrics: metrics, views: ["bezel" : bezelView!]))
         self.applyPriority(999.0, toConstraints: sideContraints)
         self.addConstraints(sideContraints)
         

        }
    }
    
    func applyPriority(priority: UILayoutPriority, toConstraints: [NSLayoutConstraint]) {
        for constraint in constraints {
            constraint.priority = priority
        }

class BHBackgroundView: UIView {
    
    var style: BHProgressHUDBackgroundStyle? {
        willSet {
            var newStyle: BHProgressHUDBackgroundStyle?
            if newValue == .Blur && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0 {
                newStyle = .SolidColor
            }
            
            if style != newStyle {
                self.style = newStyle
                updateForBackgroundStyle()
            }
        }
    }
    
    var color: UIColor? {
        willSet {
            assert(color != nil, "The color should not be nil.")
            if color != newValue && color!.isEqual(newValue) {
                self.color = newValue
                updateViewForColor()
            }
        }
    }
    
