mRs- / HexColors

HexColors is an extension for UIColor and NSColor to support for creating colors from a hex strings
MIT License
457 stars 102 forks source link

API is not correctly translated to Swift in Xcode 7.3 #35

Closed lumaxis closed 7 years ago

lumaxis commented 8 years ago

With the switch to Swift 2.2, HexColors' Obj-C API is not correctly translated to Swift anymore:

screenshot 2016-01-29 03 16 34 screenshot 2016-01-29 03 17 15
mRs- commented 8 years ago

I think this is not exactly a problem of HexColors instead it's the Swift API Transformation mentioned in here (https://swift.org/blog/swift-api-transformation/).

Swift 2.2 is dropping the with8Bit or some think we know already from UIImage UIImage(name:) instead of UIImage(imageWithName:).

Did you tried it without the with8Bit prefix?

lumaxis commented 8 years ago

@mRs- Yep, I tried but the annoying thing is that the Swift compiler insists on removing red: too so only something like this works: UIColor(246, green: 247, blue: 250)

mRs- commented 8 years ago

Okay, that's not the expected way, there is some work needed. I try to fix this as soon as possible, but maybe you got this already and can hand in a pull request?

mRs- commented 7 years ago

will be closed with https://github.com/mRs-/HexColors/tree/swift-3.0