-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Question about isFirstResponder #142
Comments
@ibeleliev I'm not sure if I quite understood your question. What are you trying to achieve? You only what assign events when the field is the first responder? |
Well I need a way to do something when the WSTagsField instance is not a firstResponder anymore. Like for example in my case after both the textField and the WSTagView's instances are not first responders. PS. I don't know if i'm explaining myself well :) |
A workaround that i use now is to fire a timer when textFieldDidEndEditing is called and check in the timer if WSTagsField.isFirstResponder is false. If it is false I execute my closures. |
I found recently this library and started using it, but i came across something that i can't figure out how to deal with.
In my code i have specific closures that i want to run when the focus is not on the WSTagsField instance. For this purpose i set the 'textDelegate' to my controller and im running the closures inside textFieldDidEndEditing. It was working fine as expected until i tried to use the backspace key in the keyboard that shows when a view becomes the first responder. I understand that textFieldDidEndEditing wouldn't be the place for my closures to be in because the instance is still the firstResponder at this point just not the textField inside the instance.
I tried looking at the WSTagsField.isFirstResponder inside textFieldDidEndEditing but did not got what i was expecting.
So my question is: Is there a better place or some event like the ones "onDidAddTag,.. etc" that i could use to monitor when the WSTagsField is indeed resigning the first responder ?
The text was updated successfully, but these errors were encountered: