         }
     }
 
-    public override class var layerClass: AnyClass {
+    open override class var layerClass: AnyClass {
         return CAGradientLayer.self
     }
 

#if os(iOS)
import UIKit

public class CustomGradientView: UIView {
    @IBInspectable var startXPercent: CGFloat = 0
    @IBInspectable var startYPercent: CGFloat = 0
    @IBInspectable var endXPercent: CGFloat = 0
    @IBInspectable var endYPercent: CGFloat = 0

    @IBInspectable
    public var startColor: UIColor = UIColor.red {

        return [startColor.cgColor, endColor.cgColor]
    }

    open override func awakeFromNib() {
        self.gradientLayer.colors = self.colors
    }

    open override func layoutSubviews() {
        super.layoutSubviews()

        self.gradientLayer.startPoint = CGPoint(
