thermogl / TITokenField

An iOS version of the NSTokenField (See To: field in Mail and Messages).
http://thermoglobalnuclearwar.com/opensource/
599 stars 172 forks source link

only add tokens of didBeginEditing if they were removed on didEndEditing #75

Closed mng12689 closed 10 years ago

mng12689 commented 10 years ago

seems like you should only be re-adding the tokens to the token field on didBeginEditing if _removesTokensOnEndEditing == YES? otherwise, you haven't removed them so there's no need to re-add them. also, in this scenario, there are unbalanced delegate callbacks. willAddToken: gets called even though willRemoveToken: was never called (since the tokens were never actually removed). this is bad if youre doing any sort of validation on willAddToken: to make sure you're not adding duplicate tokens.