I have an iOS 6 project that implements a UITableView . Each cell in the table view contains a UITextField that allows the user to enter information. If a user deletes a text field or deletes all data from the field (ie [textfield length] == 0 ) when they click on another cell (text field), it removes the previous cell (text field) from the table view, because it empty - this avoids the empty cells accumulated in the form of a table.
All this is done using the -textFieldEditingDidEnd: method, which fires the UIControlEventEditingDidEnd event for text fields:
- (void)textFieldEditingDidEnd:(UITextField *)textField { NSIndexPath *indexPath =
However, when the code starts, the application crashes with the following message on the console:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempt to delete row containing first responder that refused to resign'
I have never seen this post before, and there seems to be no special links to it when searching the Internet. I would appreciate any suggestions for fixing this issue.
source share