Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot remove tags programmatically. Decide to add tag or not after pressing return key. #15

Open
therohansanap opened this issue Dec 3, 2015 · 5 comments

Comments

@therohansanap
Copy link

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.

@AntonKuznetsov
Copy link
Collaborator

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.

@therohansanap
Copy link
Author

Got it! Thank you! @AntonKuznetsov

@therohansanap
Copy link
Author

I also noticed that condition for duplicate tags is handled in addTags: method. Well done!

@zhanglizhong1002
Copy link

作者大人 TLTagsControl 这个框架真机实测 连续打几个字的拼音 会自动enter 求帮忙解决qq1031974317

@zhanglizhong1002
Copy link

@AntonKuznetsov The adults TLTagsControl this framework of prototype measurement for Pinyin words will automatically enter seeking help to solve the qq1031974317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants