Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8994459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:26:13+00:00 2026-06-15T23:26:13+00:00

I have an iOS 6-based project that implements a UITableView . Each cell in

  • 0

I have an iOS 6-based project that implements a UITableView. Each cell in the table view contains a UITextField allowing the user to enter information. If the user clears a text field, or deletes all input from the field, (i.e. [textfield length] == 0) when they tap onto another cell (text field) it deletes the previous cell (text field) from the table view, as it’s empty – this avoids empty cells accumulating in the table view.

This is all done using a method called -textFieldEditingDidEnd: which fires on the UIControlEventEditingDidEnd event for the text fields:

- (void)textFieldEditingDidEnd:(UITextField *)textField {

    NSIndexPath *indexPath = // Index path of the row in the table view

    if ([textField.text length] == 0) {
        // Delete the cell from the table view
        [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
    }

}

However, when the code is fired the app 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 message before, and there do not seem to be particularly many references to it when searching the web. I would appreciate any suggestions on how to fix this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:26:14+00:00Added an answer on June 15, 2026 at 11:26 pm

    I’ve never seen that message before, but my immediate impulse if I were to see it would be: try delayed performance. Even something as simple as this might be an interesting experiment:

    dispatch_async(dispatch_get_main_queue(), ^{
        [self.tableView deleteRowsAtIndexPaths:@[indexPath] 
         withRowAnimation:UITableViewRowAnimationAutomatic];
    });
    

    My thought here is, let’s not try to delete the row while the text field is still reporting in (i.e. while textFieldEditingDidEnd is still running); let’s give the runloop a chance to finish its cycle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iOS app I created as a view-based app in xCode. I
I have a Jenkins job set up that builds my iOS Xcode project and
I am using an iOS 5 storyboard-based project. When presenting a modal view controller
I have an iOS app sending requests to a PHP based web service ,
Assume I have a Cocoa-based Mac or iOS app. I'd like to run a
In iOS 5, I have created a splitViewController based application in which I have
I have created a class for fetching server-side data in my iOS-App, based on
I have an iOS project to open and when i open it i get
I have an iOS app that uses a number of enums for valid values,
I am a newbie and I have a iOS project where I am setting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.