danielamitay / DAKeyboardControl

DAKeyboardControl adds keyboard awareness and scrolling dismissal (ala iMessages app) to any view with only 1 line of code.
Other
1.58k stars 214 forks source link

Keyboard freeze when I go back and forth to the View Controller that has DAKeyboardControl #70

Open hectorstudio opened 10 years ago

hectorstudio commented 10 years ago

Hi, I'm usiing this DAKeyboardControl in my app for chat. It was good and I was pleased until I found several issue. Especially this issue is very annoying and can't find why. When I go into Chat page with this control and tap the textview to enter message, and then swipe down, it works fine, and I get out of that page, and then right go back again. When I do this several times, sometimes just once or twice, then the keyboard freeze when I tap the textview. And it take a while like 10 secs before they keyboard active again.

I've commented all the related code and just used this control and same thing happen. Hope someone can help me fix this issue.

Many thanks.

danho322 commented 9 years ago

Was this issue ever resolved?

danho322 commented 9 years ago

Found what's happening, in hideKeyboard, the keyboard is being hidden and userInteractionEnabled is set to NO. If this keyboard is set as the active keyboard (in setKeyboardActiveView:), it will still be "frozen". I fixed it by adding this to the beginning of setKeyboardActiveView:

if (keyboardActiveView)
{
    [keyboardActiveView setUserInteractionEnabled:YES];
    [keyboardActiveView setHidden:NO];
}
nmtitov commented 9 years ago

This helped me with the same problem, thank you.