Open bbqsrc opened 7 years ago
Yes, NSImage has no tintColor
as UIImage on iOS does. So currently it's like a placeholder. Although, I can implement it by applying image transformations.
Yeah, my current experimentation with that has got me to here:
extension NSImage {
func tint(color: NSColor) {
lockFocus()
color.set()
NSRectFillUsingOperation(NSMakeRect(0, 0, self.size.width, self.size.height), .sourceAtop)
unlockFocus()
isTemplate = false
}
}
The UIExplorer test app shows the issue:
As you can see, they're all the same color when they should not be. 😉