 
     // MARK: UIView
 
-    override class func layerClass() -> AnyClass {
+    override public class func layerClass() -> AnyClass {
         return BendableLayer.self
     }
 
-    override func layoutSubviews() {
+    override public func layoutSubviews() {
         super.layoutSubviews()
 
         updatePath()

    }
}

protocol BendableLayerDelegate {
    func positionAnimationWillStart(anim: CABasicAnimation)
}


/// to animate the change of the position and set `damping` and `initialSpringVelocity` to different values
/// than in that animation call. I propose to use slightly lower values for these properties.
/// These properties can't be set automatically, because `CASpringAnimation` is private.
public class BendableView: UIView, BendableLayerDelegate {

    public var damping: CGFloat = 0.7
    public var initialSpringVelocity: CGFloat = 0.8
    public var fillColor: UIColor = UIColor(red: 0, green: 0.722, blue: 1, alpha: 1) {
    didSet {
        updateColor()
    }
    }

    private var displayLink: CADisplayLink?
    private var animationCount = 0
    // A hidden view that is used only for spring animation's simulation.
    // Its frame's origin matches the view's frame origin (except during animation). Of course it is in a different coordinate system,
    // but it doesn't matter to us. What we're interested in, is a position's difference between this subview's frame and the view's frame.
    // This difference (`bendableOffset`) is used for "bending" the edges of the view.
    private let dummyView = UIView()
    private let shapeLayer = CAShapeLayer()
    private var bendableOffset: UIOffset = UIOffsetZero {
    didSet {
        updatePath()
    }
