fcanas / ios-color-picker

A color picker for iOS
MIT License
119 stars 27 forks source link

Color Not Matching Swatch #7

Closed wei closed 9 years ago

wei commented 9 years ago

Hi there, I tried to use your library in Swift. Color in the circle doesn't seem to be matching the swatch and the swatch seems to have been flipped. Have you encountered this issue? Thanks!!

image image image

fcanas commented 9 years ago

@ddhhz Wow. I have not encountered this issue before. How are you including the color picker? The swatch looks completely wrong -- it's not supposed to have the black gradient. We might have to dig through a few more details of your particular usage to figure out what went wrong.

wei commented 9 years ago

@fcanas Thanks for your quick response. This is literally everything

image

image

wei commented 9 years ago

I will do a bit more digging tomorrow and perhaps upload a test project.

fcanas commented 9 years ago

That would be excellent.

I created a new Swift target in the example project on a new branch and it does not exhibit this problem: https://github.com/fcanas/ios-color-picker/tree/swift-example

In case it was an issue with frameworks, I made a branch with no frameworks and an Objective-C bridging header, and that didn't exhibit the problem either. https://github.com/fcanas/ios-color-picker/tree/swift-no-frameworks

One issue I did encounter is when including the color picker via a framework, instantiating the view controller fails because it's not looking for its xib in the correct bundle. I've fixes that now in 4f2a44e90074376c5cfe008667fb8444fd915d72

That fix makes me want to make a patch release soon. Please let me know what you find when you dig into your problem.

wei commented 9 years ago

I tried swapping it out with one of my images, it shows up correctly. Tried to use xcassets, works fine. Removed all Pods and pod install -> fixed. So sorry to waste your time. It must be my xcode ; |

fcanas commented 9 years ago

My best guess is that you had a similar, but different image with the same name as the asset this library uses. If it's not that, I have no idea.

Thank you for bringing this up, because it brought #8 to my attention. Definitely not a waste of time :confetti_ball:

wei commented 9 years ago

= D. Nope I didn't have any image like that in my project. Must be xCode being dumb. Thanks for all your good work.