on master help sign in
ColorSquarePicker: add color API.
commitfceca6562789711d9706f1b7d8c527dd685b1dea authorLouis D'hauwe <louisdhauwe@silverfox.be> dateMon 2 Apr 2018, 16:20 (9 years ago) parente23fdf8
1 file changed+5−1
HueKit/View/ColorSquarePicker.swift+5−1
HueKit/View/ColorSquarePicker.swift+5−1
@@ -49,11 +49,15 @@ public class ColorSquarePicker: UIControl {
4949 }
5050 }
5151 }
52+
53+ public var color: UIColor {
54+ return UIColor(hue: hue, saturation: value.x, brightness: value.y, alpha: 1.0)
55+ }
5256
5357 private func setIndicatorColor() {
5458
5559 colorSquareView.hue = hue
56− indicator.color = UIColor(hue: hue, saturation: value.x, brightness: value.y, alpha: 1.0)
60+ indicator.color = color
5761 }
5862
5963 public override func layoutSubviews() {