Cannot remove tags programmatically. Decide to add tag or not after pressing return key.
So I have this situation where duplicate tags are not allowed. So I was trying to check if the tag is already present in tags array and then decide If I want to add tag or not. But I cannot control what happens on pressing return. So I thought I, let the tag get added. I will check for the duplicate after that, and if present, I will programmatically remove it but there is no provision for that too. If possible, can you please address this issue? At least support for removing tags programmatically.
Hi @therohansanap
In fact you can remove a tag programmatically. TLTagsControl has *tags property which is kind of NSMutableArray class. This means that you can remove any object from this array using removeObject: method. If you modify *tags property programmatically you should reload TLTagsControl by using reloadTagSubviews method.
Hope that helps.
Got it! Thank you! @AntonKuznetsov
I also noticed that condition for duplicate tags is handled in addTags: method. Well done!
作者大人 TLTagsControl 这个框架真机实测 连续打几个字的拼音 会自动enter 求帮忙解决qq1031974317
@AntonKuznetsov The adults TLTagsControl this framework of prototype measurement for Pinyin words will automatically enter seeking help to solve the qq1031974317