This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var shadowLayer: CAShapeLayer! | |
private var cornerRadius: CGFloat = 25.0 | |
private var fillColor: UIColor = .blue // the color applied to the shadowLayer, rather than the view's backgroundColor | |
override func layoutSubviews() { | |
super.layoutSubviews() | |
if shadowLayer == nil { | |
shadowLayer = CAShapeLayer() | |