Closed ashare80 closed 3 years ago
I tested this, and found two issues:
needsLayout = true
in drawableLayers
or drawable
getRed:blue:green:alpha:
on colors which use different color spaces, and will throw an exception if this is called on a color that isn't in sRGB. I'm okay landing with these still in, I can clean them up later. Just a heads up in case you're using this code.
I tested this, and found two issues:
- the mac version doesn't support setting the drawable after it's been laid out. The fix seems to be
needsLayout = true
indrawableLayers
ordrawable
- It seems that MacOS is far less liberal than iOS about calling
getRed:blue:green:alpha:
on colors which use different color spaces, and will throw an exception if this is called on a color that isn't in sRGB.I'm okay landing with these still in, I can clean them up later. Just a heads up in case you're using this code.
Cool yeah I didn't really test yet, main goal was just trying to get it to at least import nicely with a macOS/iOS SwiftUI app. I guess technically with the NSView being used the min macOS version could be lower, just not sure how low.
All committers have signed the CLA.