-
Notifications
You must be signed in to change notification settings - Fork 214
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
DAKeyboardControl.m -inputKeyboardDidShow: (lines # 208-212) #9
Comments
Err I'll see what I can do. The -inputKeyboardDidShow method is in there to rectify the situation where the UIResponder has a nil I remember this issue, but thought I fixed it. Will look again. |
thanks for your reply. To fix it i added 2 methods to DAKeyboardControl.m: - (void) reAssignFirstResponder{
// Find first responder
UIView *inputView = [self recursiveFindFirstResponder:self];
if (inputView != nil) {
// Re assign the focus
[inputView resignFirstResponder];
[inputView becomeFirstResponder];
}
}
- (UIView*) recursiveFindFirstResponder:(UIView*)view{
if ([view isFirstResponder]) {
return view;
}
UIView *found = nil;
for (UIView *v in view.subviews) {
found = [self recursiveFindFirstResponder:v];
if (found) {
break;
}
}
return found;
} and i replaced the lines 210 and 211 with this line: [self reAssignFirstResponder]; but this works only if the responder is under self. |
Thanks for pointing this out, as well as your solution. Apologies for taking so long! |
I have a view with a UITextField and a UITextView, these are always visible also with the keyboard opened. If i select the UITextField is all ok, i can write in that field. If after i select the UITextView, with these lines of code, you are focusing again on the old UITextField (not on the text view i selected). I think this goes in conflict with the system focus on the right responder so i see the cursor blinking on the UITextView (right) but i'm writing on the UITextField (wrong).
The main problem i think is with the UITextView, this type of responder sends the UIKeyboardDidShowNotification notification before of the UITextViewTextDidBeginEditingNotification notification.
thank you
PS: i like the way you implemented the keyboard panning gesture.
The text was updated successfully, but these errors were encountered: