diff --git a/Spring/DesignableImageView.swift b/Spring/DesignableImageView.swift index 32a90a2..463c893 100644 --- a/Spring/DesignableImageView.swift +++ b/Spring/DesignableImageView.swift @@ -42,4 +42,28 @@ import UIKit } } + @IBInspectable public var shadowColor: UIColor = UIColor.clear { + didSet { + layer.shadowColor = shadowColor.cgColor + } + } + + @IBInspectable public var shadowRadius: CGFloat = 0 { + didSet { + layer.shadowRadius = shadowRadius + } + } + + @IBInspectable public var shadowOpacity: CGFloat = 0 { + didSet { + layer.shadowOpacity = Float(shadowOpacity) + } + } + + @IBInspectable public var shadowOffsetY: CGFloat = 0 { + didSet { + layer.shadowOffset.height = shadowOffsetY + } + } + } diff --git a/Spring/DesignableTextField.swift b/Spring/DesignableTextField.swift index edc5a2b..1d4b7e7 100644 --- a/Spring/DesignableTextField.swift +++ b/Spring/DesignableTextField.swift @@ -97,4 +97,28 @@ import UIKit } } + @IBInspectable public var shadowColor: UIColor = UIColor.clear { + didSet { + layer.shadowColor = shadowColor.cgColor + } + } + + @IBInspectable public var shadowRadius: CGFloat = 0 { + didSet { + layer.shadowRadius = shadowRadius + } + } + + @IBInspectable public var shadowOpacity: CGFloat = 0 { + didSet { + layer.shadowOpacity = Float(shadowOpacity) + } + } + + @IBInspectable public var shadowOffsetY: CGFloat = 0 { + didSet { + layer.shadowOffset.height = shadowOffsetY + } + } + } diff --git a/Spring/DesignableTextView.swift b/Spring/DesignableTextView.swift index 3db40b3..f9bef43 100644 --- a/Spring/DesignableTextView.swift +++ b/Spring/DesignableTextView.swift @@ -58,4 +58,28 @@ import UIKit } } + @IBInspectable public var shadowColor: UIColor = UIColor.clear { + didSet { + layer.shadowColor = shadowColor.cgColor + } + } + + @IBInspectable public var shadowRadius: CGFloat = 0 { + didSet { + layer.shadowRadius = shadowRadius + } + } + + @IBInspectable public var shadowOpacity: CGFloat = 0 { + didSet { + layer.shadowOpacity = Float(shadowOpacity) + } + } + + @IBInspectable public var shadowOffsetY: CGFloat = 0 { + didSet { + layer.shadowOffset.height = shadowOffsetY + } + } + }