Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

A bug, in a dynamic form, click on the "previous", problems can arise. #4

Open
Lcccocoa opened this issue Aug 8, 2012 · 2 comments

Comments

@Lcccocoa
Copy link

Lcccocoa commented Aug 8, 2012

Click "previous", a UITextField pop-up keyboard, where the UITableCell activeTextField generated scrollViewToTextField method execution failed, leading to the keyboard can not be recycled.This is a great project.

@mabril
Copy link

mabril commented Jun 7, 2013

Solution:

On your delegate method, add the last lines

  • (void)keyboardControls:(BSKeyboardControls *)keyboardControls selectedField:(UIView *)field inDirection:(BSKeyboardControlsDirection)direction
    {
    UIView *view = keyboardControls.activeField.superview;
    [self.tableView scrollRectToVisible:view.frame animated:YES];

    //Fix Keyboard stuck on previous rows
    double delayInSeconds = 0.2;
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
    [field becomeFirstResponder];
    });
    }

@pandya293
Copy link

hay,

Have check this solution?
NSMutableArray *textFields = [NSMutableArray arrayWithArray:self.keyboardControls.textFields];
[textFields addObject:self.textBiography];
self.keyboardControls.textFields = textFields;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants