ColorSquarePicker: add color API.

This commit is contained in:
Louis D'hauwe 2018-04-02 16:20:01 +02:00
parent e23fdf8e50
commit fceca65627

View File

@ -49,11 +49,15 @@ public class ColorSquarePicker: UIControl {
}
}
}
public var color: UIColor {
return UIColor(hue: hue, saturation: value.x, brightness: value.y, alpha: 1.0)
}
private func setIndicatorColor() {
colorSquareView.hue = hue
indicator.color = UIColor(hue: hue, saturation: value.x, brightness: value.y, alpha: 1.0)
indicator.color = color
}
public override func layoutSubviews() {