     @available(*, unavailable)
     public convenience init(rect r: CGRect) { fatalError() }
 }
+
+
+// MARK: Frame Override
+extension BorderLayer {
+    public override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set(newFrame) {
+            guard newFrame != super.frame else { return }
+            super.frame = newFrame
+            self.path = self._createPath()
+        }
+    }
+}
+
+
+// MARK: // Private
+// MARK: BorderInset
+private extension BorderLayer {
+    var _borderEdgeInsets: UIEdgeInsets {
+        get {
+            return self.__borderEdgeInsets
+        }
+        set(newBorderEdgeInsets) {
+            guard newBorderEdgeInsets != self.__borderEdgeInsets else { return }
+            self.__borderEdgeInsets = newBorderEdgeInsets
+            self.path = self._createPath()
+        }
+    }
+}
+
+
+// MARK: Create Path
+private extension BorderLayer {
+    func _createPath() -> CGPath {
+        let size: CGSize = self.frame.size
+        let insets: UIEdgeInsets = self.borderEdgeInsets
+        let x: CGFloat = insets.left
+        let y: CGFloat = insets.top
+        let width: CGFloat = size.width - (x + insets.right)
+        let height: CGFloat = size.height - (y + insets.bottom)
+        let pathFrame: CGRect = CGRect(x: x, y: y, width: width, height: height)
+        return CGPath(rect: pathFrame, transform: nil)
+    }
+}


// MARK: // Public
// MARK: Interface


// MARK: Class Declaration
class BorderLayer: CAShapeLayer {
    // Required Init
    required public init?(coder aDecoder: NSCoder) {
        fatalError("BorderLayer does not support NSCoding")

    override init(layer: Any) {
        super.init(layer: layer)
    }
    
    // Private Variables
    fileprivate var __borderEdgeInsets: UIEdgeInsets = .zero
}


