I have an array of NSColor
s, and an array of CGFloat
s signifying gradient stops. I can't figure out how to use these arrays to initialize a NSGradient
.
I tried making these into an array of (NSColor, CGFloat)
s, but NSGradient(colorsAndLocations:
won't take it, since it expects varargs:
And NSGradient(colors:, atLocations:, colorSpace:)
expects a UnsafePointer
which I have no idea how to properly handle in Swift, if there is even such a way.