[UITableViewCell _didChangeToFirstResponder:]: message sent to the freed instance

I added a text box to tableview cellviewview.when I edit any text box, and I scroll down the table and release the keyboard. Then the application crashed for this reason. [UITableViewCell _didChangeToFirstResponder:]: message sent to the freed instance

+8
uitableview ios7
source share
1 answer

Try to hide the keyboard while scrolling.

In class h Declare a text field

UITextField *selectedTextField; 

In class m

 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { selectedTextField = textField; return YES; } 

I also had the same problem. The above solution fixed this.

All the best.

 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { [selectedTextField resignFirstResponder]; } 
+6
source share

All Articles