I am using an IBInspectable NSColor property to set the background colour of my view but when I use the colour picker in xcode it lets me initially set the value but then when I go to change any other value on the picker it no longer takes effect.
Only when I reclick the colour picker will it allow me to make futher changes.
Am I missing something here?
Kind Regards
Brian
@IBDesignable class PianoRollGridView: NSView {
@IBInspectable var backgroundColour: NSColor = NSColor(deviceRed:0.16, green:0.17, blue:0.21, alpha:1.00) {
didSet {
layer?.backgroundColor = backgroundColour.cgColor
}
}
required init?(coder: NSCoder) {
super.init(coder:coder)
self.wantsLayer = true
}
}