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

How to prevent string from being tokenized if it is not selected from menu? #74

Closed khawarshzd closed 10 years ago

khawarshzd commented 10 years ago

I want user to select only from menu. Only selection from menu should be tokenized. Any other string should be removed if he ends editing.

thermogl commented 10 years ago

Look at the delegate methods. There's something in there to reject tokens being added.

khawarshzd commented 10 years ago

Thanks, finally i implemented delegate. -(BOOL)tokenField:(TITokenField )tokenField willAddToken:(TIToken )token

I check the "representedObject" property of "token". If it is "nil" return "NO".