michaeltyson / TPKeyboardAvoiding

A drop-in universal solution for moving text fields out of the way of the keyboard in iOS
http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/
zlib License
5.81k stars 925 forks source link

Can add a touch block to these TPKeyboardAvoidingView? #274

Open SabinLee opened 5 years ago

SabinLee commented 5 years ago

I view the code, and I realize that such as TPKeyboardAvoidingScrollView always to find it subviews to resign fist responder, but when the text field is not the subview, it doesn't work. so I think we can add a touch block to TPKeyboardAvoidingScrollView, and call it in (touchesEnded: withEvent:), I can set this block to do my custom event