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

UITextFieldDelegate #158

Closed
ghost opened this issue Feb 6, 2015 · 2 comments
Closed

UITextFieldDelegate #158

ghost opened this issue Feb 6, 2015 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 6, 2015

When we are using KeyboardManager.framework.
We have 3 textfields on view for which we have set deleegate.

When we are making any UITextField as first responder, delegate method -(BOOL)textFieldShouldBeginEditing:(UITextField *)textField is calling 3 to 4 times for all textfields which are in view.

@ghost ghost closed this as completed Feb 6, 2015
@hackiftekhar
Copy link
Owner

Please check 'Doing custom work on textField with returning NO in textFieldShouldBeginEditing: delegate:-' section in README.md file. Hope this helps.

@hackiftekhar
Copy link
Owner

@parthmind, Due to seeing too many issues reported for textFieldShouldBeginEditing call multiple times, I know it's due to the Apple API's limitation. But I decided to remove validating canBecomeFirstResponder calls to fix this issue for IQKeyboardManager library, so textFieldShouldBeginEditing delegate method will not be called multiple times, but developers need to update their logic they wrote with isAskingCanBecomeFirstResponder. This variable will also be deprecated and will be removed in future releases.

This is my action plan:-

  • Current CocoaPods version is 4.0.8. In next couple of days 4.0.9 will be pushed to CocoaPods with some bug fixes and improvements. 4.0.9 will be swift 3.1 compatible version.
  • After 4.0.9, necessary changes will be made to remove canBecomeFirstResponder method call and isAskingCanBecomeFirstResponder will be put into the deprecated property list with warning text to inform developers about this. This code will be pushed to master.
  • After successful testing of new changes regarding canBecomeFirstResponder we'll push 4.1.0 to CocoaPods (probably after 1 month of 4.0.9).
  • In upcoming releases isAskingCanBecomeFirstResponder will be removed from library since this property was come to existence as a workaround to handle textFieldShouldBeginEditing issue, but after removing canBecomeFirstResponder method call, this property will make no sense.

Let me know if anyone has any thoughts or suggestion on this. I would love to hear.

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

No branches or pull requests

1 participant