diff --git a/Sources/Floaty.swift b/Sources/Floaty.swift index 9dc40e4..ea2260b 100644 --- a/Sources/Floaty.swift +++ b/Sources/Floaty.swift @@ -105,6 +105,12 @@ open class Floaty: UIView { @objc @IBInspectable open var buttonColor: UIColor = UIColor(red: 73/255.0, green: 151/255.0, blue: 241/255.0, alpha: 1) + /** + Button highlighted color. + */ + @objc @IBInspectable + open var buttonHighlightedColor: UIColor? + /** Button shadow color. */ @@ -750,9 +756,9 @@ open class Floaty: UIView { fileprivate func setTintLayer() { tintLayer.frame = CGRect(x: circleLayer.frame.origin.x, y: circleLayer.frame.origin.y, width: size, height: size) - tintLayer.backgroundColor = UIColor.white.withAlphaComponent(0.2).cgColor + tintLayer.backgroundColor = buttonHighlightedColor?.cgColor ?? UIColor.white.withAlphaComponent(0.2).cgColor tintLayer.cornerRadius = size/2 - layer.addSublayer(tintLayer) + layer.insertSublayer(tintLayer, below: buttonImageView.layer) } fileprivate func setOverlayView() {