Can someone please help me set content filter on objects such as NSbutton using swift, I'm trying to set content filter false colour but its not putting the colour I want it to use instead its using the default colours.
not sure what im doing wrong
not sure what im doing wrong
Code:
if let myFilter = CIFilter(name: "CIFalseColor") {
myFilter.name = "myFilter"
layer.backgroundFilters = [myFilter]
layer.setValue(NSColor.black, forKeyPath: "contentFilters.myFilter.inputColor1")
layer.setValue(NSColor.white, forKeyPath: "contentFilters.myFilter.inputColor2")
myButton.contentFilters = [myFilter]
}