         if edges.contains(.Top) || edges.contains(.All) {
             let top = border()
             addSubview(top)
-            NSLayoutConstraint.constraintsWithVisualFormat("V:|-(0)-[top(==thickness)]",
+            NSLayoutConstraint.constraintsWithVisualFormat("V:|-paddingTop-[top(==thickness)]",
                 options: [],
-                metrics: ["thickness": thickness],
+                metrics: metrics,
                 views: ["top": top]).activate()
-            NSLayoutConstraint.constraintsWithVisualFormat("H:|-(0)-[top]-(0)-|",
+            NSLayoutConstraint.constraintsWithVisualFormat("H:|-paddingLeft-[top]-paddingRight-|",
                 options: [],
-                metrics: nil,
+                metrics: metrics,
                 views: ["top": top]).activate()
             borders.append(top)
         }

        if edges.contains(.Bottom) || edges.contains(.All) {
            let bottom = border()
            addSubview(bottom)
            NSLayoutConstraint.constraintsWithVisualFormat("V:[bottom(==thickness)]-(0)-|",
                options: [],
                metrics: ["thickness": thickness],
                views: ["bottom": bottom]).activate()
            NSLayoutConstraint.constraintsWithVisualFormat("H:|-(0)-[bottom]-(0)-|",
                options: [],
                metrics: nil,
                views: ["bottom": bottom]).activate()
            borders.append(bottom)
        }


    // Credit: http://stackoverflow.com/a/23157272

    public func addBorder(edges edges: UIRectEdge, color: UIColor = UIColor.whiteColor(), thickness: CGFloat = 1, padding: UIEdgeInsets = .zero) -> [UIView] {
        var borders = [UIView]()
        let metrics = ["thickness": thickness, "paddingTop": padding.top, "paddingLeft": padding.left, "paddingBottom": padding.bottom, "paddingRight": padding.right]

        func border() -> UIView {
            let border = UIView(frame: .zero)
