TITokenField icon indicating copy to clipboard operation
TITokenField copied to clipboard

Flat Token Design Support & Podspec file

Open callbacknull opened this issue 10 years ago • 1 comments

In this PR I've added support for flat color tokens (i.e no gradients). When the token is selected/highlighted the color is adjusted to be either slightly lighter or darker dependent on a weighted brightness of the token's tintcolor. See the image below for an example.

For those who don't know, you can adjust your token's tintColor in the following delegate:

  • (BOOL)tokenField:(TITokenField *)tokenField willAddToken:(TIToken *)token

I also added the podspec file as this is fairly standard across pods to have it in the repo. (I would say at least 90% of the pods I've used / looked at have it this way)

flat_tokens

callbacknull avatar Jul 10 '14 05:07 callbacknull

In TIToken's drawRect: method I'm pretty sure I segregated all the gradient color setting correctly. Well, The results sure look right. But let me know if I may have messed that up and I can fix it.

callbacknull avatar Jul 10 '14 05:07 callbacknull