Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixing a bug related to cell deallocation #2

merged 2 commits into from Dec 7, 2012


None yet
3 participants

jivadevoe commented Mar 8, 2012

In some cases, if a cell is deallocated while the right text field has first responder, the keyboard will not dismiss. This fixes that problem.

Hey can you give an example of the new delegate method:

in the old version I would do:

pragma mark ELCTextFieldCellDelegate Methods

-(void)textFieldDidReturnWithIndexPath:(NSIndexPath*)indexPath {

if(indexPath.row < [labels count]-1) {
    NSIndexPath *path = [NSIndexPath indexPathForRow:indexPath.row+1 inSection:indexPath.section];
    [[(ELCTextfieldCell*)[self.tableViewForm cellForRowAtIndexPath:path] rightTextField] becomeFirstResponder];
    [self.tableViewForm scrollToRowAtIndexPath:path atScrollPosition:UITableViewScrollPositionTop animated:YES];

else {

    [[(ELCTextfieldCell*)[self.tableViewForm cellForRowAtIndexPath:indexPath] rightTextField] resignFirstResponder];


But what should I do now???

Yeah it would be nice to have an example that shows correct usage of all the delegate methods I need to implement in my UIViewController

or more specifically what to put in this method now:

-(BOOL)textField:(ELCTextfieldCell )inCell shouldReturnForIndexPath:(NSIndexPath)inIndexPath withValue:(NSString *)inValue{

@jvanmetre jvanmetre pushed a commit that referenced this pull request Dec 7, 2012

jvanmetre Merge pull request #2 from jivadevoe/master
Fixing a bug related to cell deallocation

@jvanmetre jvanmetre merged commit 5e0c9c3 into B-Sides:master Dec 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment