ACBTokenField
ACBTokenField copied to clipboard
Feature request: set per-token colors
It would be ideal to be able to provide a color per-token, presumably with a delegate method.
It looks like there is a "backgroundColor" property already, but it doesn't seem to be used.
Also, if you can point me in the right direction, I’d be up for trying to implement a PR with this.
Thanks for the feature request. I don't think NSTokenField supports this out of the box. You may have to look at some custom implementations for this.
Here is a stackoverflow question: https://stackoverflow.com/questions/17672413/nstokenfield-different-colors-for-tokens
It seems like you may have to customize token cell. In this case it would beACBTokenFieldCell
in file NSTokenField+ACBExtension.swift
. You can add a callback block similar to didDeleteTokenBlock
.