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

If support UIView? #455

Closed
wy19901227 opened this issue Mar 17, 2016 · 8 comments
Closed

If support UIView? #455

wy19901227 opened this issue Mar 17, 2016 · 8 comments

Comments

@wy19901227
Copy link

HI, If I Write a textView base on UIView,So,When MyTextView becomFirstRespond,How Can I make it can be Know By IQKeyBadrdManager?

@hackiftekhar
Copy link
Owner

If you are writing your own textView using UIView and CoreText framework then I need to check if it will work with IQKeyboardManager. I'm not 100% sure.

@wy19901227
Copy link
Author

I did check ,IQ will not identify it as a textView

@hackiftekhar
Copy link
Owner

Then you can share a demo project with me and I'll find-out a solution for you.

@wy19901227
Copy link
Author

YYTextViewDemo.zip

@wy19901227
Copy link
Author

Thank you.

@hackiftekhar
Copy link
Owner

I checked the demo and I found two reasons with YYTextView.

  1. YYTextView is firing YYTextViewTextDid.... notifications while IQKeyboardManager is listening only for UITextViewTextDid.... notifications. That's why IQKeyboardManager is unable to detect YYTextView.

  2. When I replaced YYTextViewTextDid.... notifications with UITextViewTextDid.... notifications, then I got an issue with the toolbar with Done button. Done button doesn't appear at first time. So probably we need to 'reloadInputViews' manually.

Let me know what you thought about this.

@abellee
Copy link

abellee commented May 1, 2016

but the YYTextView seems can not be the first responder,

so everytime I do click the YYTextView, the keyboard will rise again and again even though it has showed up!

@hackiftekhar hackiftekhar reopened this May 3, 2016
@hackiftekhar
Copy link
Owner

It's working for me with your demo with some changes. Please check.
YYTextViewDemo.zip

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

3 participants