lionheart / LHSKeyboardAdjusting

An easy-to-use Objective-C protocol that automatically resizes / adjusts views when a keyboard appears on iOS.
http://lionheartsw.com
Apache License 2.0
100 stars 10 forks source link

Keyboard dismissed by button tap #2

Closed ghost closed 10 years ago

ghost commented 10 years ago

I'm using a UITapGestureRecognizer which calls end editing to automatically hide the keyboard when tapping outside the UITextField. When I tap in a textfield the keyboard opens and the screen adjust correctly using your code. However when I tap a UIButton that is a little further down the screen, the keyboard is hidden and the button's UIControlEventTouchDown is called however the UIControlEventTouchUpInside on the button is not invoked.

dlo commented 10 years ago

If the UIControlEventTouchUpInside were not called, I'm not sure how LHSKeyboardAdjusting would prevent that. This seems to be a side-effect of something iOS is doing (not the library). Let me know if you run into any other issues.