         }
     }
 
+    func anchorForSize(size: SizeAnchor) -> NSLayoutDimension {
+        if size == .width {
+            return self.widthAnchor
+        } else if size == .height {
+            return self.heightAnchor
+        } else {
+            fatalError("There is an unhandled size. Have you considered checking in another dimension? 📐")
+        }
+    }
+
     func _objcPinToView(view: UIView, inset: UIEdgeInsets = UIEdgeInsetsZero) -> [NSLayoutConstraint] {
         let viewConstraints: [NSLayoutConstraint] = [
             self.leadingAnchor.constraintEqualToAnchor(view.leadingAnchor, constant: inset.left),

    func setSize(sizeAnchor: SizeAnchor, relation: NSLayoutRelation = .Equal, activate: Bool = true) -> NSLayoutConstraint {
        self.translatesAutoresizingMaskIntoConstraints = false

        let currentDimension: NSLayoutDimension

        if sizeAnchor == .width {
            currentDimension = self.widthAnchor
        } else if sizeAnchor == .height {
            currentDimension = self.heightAnchor
        } else {
            fatalError("Looks like we sized this constraint up all wrong… 📐")
        }

        let constraint: NSLayoutConstraint
        if relation == .GreaterThanOrEqual {


    func setSize(sizeAnchors: [SizeAnchor] = [ SizeAnchor.width, SizeAnchor.height ], relation: NSLayoutRelation = .Equal, activate: Bool = true) -> [NSLayoutConstraint] {
        return sizeAnchors.map { return self.setSize($0, relation: relation, activate: activate) }
    }

    func setRelativeSize(sizeAnchor: SizeAnchor, toSizeAnchor: SizeAnchor, ofView: UIView, multiplier: CGFloat, constant: CGFloat, relation: NSLayoutRelation = .Equal, activate: Bool = true) -> NSLayoutConstraint {
        self.translatesAutoresizingMaskIntoConstraints = false

        let currentDimension: NSLayoutDimension

        let fromDimension = self.anchorForSize(sizeAnchor)
        let toDimension = ofView.anchorForSize(toSizeAnchor)

        let constraint: NSLayoutConstraint
        if relation == .GreaterThanOrEqual {
            constraint = fromDimension.constraintGreaterThanOrEqualToAnchor(toDimension, multiplier: multiplier, constant: constant)
        } else if relation == .LessThanOrEqual {
            constraint = fromDimension.constraintLessThanOrEqualToAnchor(toDimension, multiplier: multiplier, constant: constant)
        } else {
            constraint = fromDimension.constraintEqualToAnchor(toDimension, multiplier: multiplier, constant: constant)
        }

        constraint.priority = sizeAnchor.priority
        constraint.active = activate

        return constraint
    }

}
