 open class CustomGradientView: UIView {
     @IBInspectable public var startXPercent: CGFloat = 0
     @IBInspectable public var startYPercent: CGFloat = 0
-    @IBInspectable public var endXPercent: CGFloat = 0
-    @IBInspectable public var endYPercent: CGFloat = 0
+    @IBInspectable public var endXPercent: CGFloat = 1
+    @IBInspectable public var endYPercent: CGFloat = 1
 
     @IBInspectable
     public var startColor: UIColor = UIColor.red {

    }

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

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

        self.gradientLayer.startPoint = CGPoint(
            x: self.startXPercent,

        self.gradientLayer.add(animation, forKey: "animateColors")
    }
}

private extension CustomGradientView {
    func refresh()  {
        self.gradientLayer.colors = self.colors
    }
}
#endif
