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

Repeatedly called UITextField delegate while tapping on UITextView #474

Closed
Deepinder-Lakhi opened this issue Apr 1, 2016 · 18 comments
Closed

Comments

@Deepinder-Lakhi
Copy link

Hii @hackiftekhar

i have weird problem when i tap on UITextView it will Call TextField delegate first and then TextView delegate in last really confused what to do . And it also had a issue when ever i was tapping on textfield in my UITableViewCell for example i have tapped on 4th cell it will call textfieldDidBegin method repeatedly like for 0th index and hence so on. Is there any need to use IQTextView Or IQTextField instead of UITextField or UITextView if yes then how ?

Please help in this what i have to do. As you mentioned .As you have mentioned it is CodeLess IQKeyBoardManager but it was not working for me. Really hope to get Quick help from you Thanks! in advance.

@hackiftekhar
Copy link
Owner

Power Comes With Responsibility brother. In most cases the library is codeless and you don't need to do any extra configuration. However there are some special cases where we have some issues. Could you please share a demo project?

@Deepinder-Lakhi
Copy link
Author

Sir I have shared my Demo code with you please take a look.

@hackiftekhar
Copy link
Owner

I'm unable to find demo project you shared. Could you please provide me a download link?

@Deepinder-Lakhi
Copy link
Author

Sure sir just wait a mint i will share with you

@Deepinder-Lakhi
Copy link
Author

Deepinder-Lakhi commented Apr 1, 2016 via email

@Deepinder-Lakhi
Copy link
Author

Hello
sir have you got the time to see my problem

@hackiftekhar
Copy link
Owner

I tried to look at your demo, but unfortunately I didn't find ComposeMsgTableViewCell.h and MessageTableViewCell.h files there. Hence unable to run your demo.

@Deepinder-Lakhi
Copy link
Author

Sorry sir actually i have accidentally imported files without copying to project .Now i have shared a new link of my demo source code and including to screen short of my problem pls take a look on it .

Please find link below

https://www.dropbox.com/s/ry3a5tpy8c554q0/TextFieldDemoProject.zip?dl=0

@hackiftekhar
Copy link
Owner

I got the issue you are facing. There is already a workaround for this question. You can look at README file and you'll find a workaround for textFieldShouldBeginEditing: method.

@hackiftekhar
Copy link
Owner

This is also duplicate of #88 and #158

@Deepinder-Lakhi
Copy link
Author

Ok sir I’m really very thank full to you for giving your time for my problem .For now i have disable my ToolBar that fix the issue but in might be need this to work for the next release of my app and sir i am using IQKeyboardManager', '~> 3.3.4 version of cocoa pod please let me know the latest version of cocoa pod for this library.

Again very very thank full to you .

@hackiftekhar
Copy link
Owner

It is 4.0.0. But will release 4.0.1 soon.

@Deepinder-Lakhi
Copy link
Author

OK sir thanx..

@hackiftekhar
Copy link
Owner

4.0.1 is released.

@Deepinder-Lakhi
Copy link
Author

Thanks sir and sir what would be the minimum deployment target iOS version for this version

@hackiftekhar
Copy link
Owner

It's iOS 8.

@Deepinder-Lakhi
Copy link
Author

fine thank you sir .

@hackiftekhar
Copy link
Owner

@Deepinder-Lakhi, 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.

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

No branches or pull requests

2 participants