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

  • Home
  • SEARCH
  • 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 1033155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:11:22+00:00 2026-05-16T14:11:22+00:00

Having meticulously followed the examples and instructions in the Table View Programming Guide for

  • 0

Having meticulously followed the examples and instructions in the Table View Programming Guide for iOS about the proper order in which UITableView delegate and data source methods are called, I thought I had a good idea of how to implement the “handshake” shown in Figure 7-1 and the list that follows, but apparently not.

Here’s the code I’m using…

- (void) tableView: (UITableView *) tableView commitEditingStyle: (UITableViewCellEditingStyle) editingStyle forRowAtIndexPath: (NSIndexPath *) indexPath {
    NSLog(@"Removing %@ row %d.", [dataModel objectAtIndex: indexPath.row], indexPath.row);
    [tableView deleteRowsAtIndexPaths: [NSArray arrayWithObjects: indexPath, nil] withRowAnimation: UITableViewRowAnimationFade];
    [dataModel removeObjectAtIndex: indexPath.row];
}

tableView is the UITableView
dataModel is an NSArray instance that holds the objects represented by the UITableViewCells from the tableView.

…and the error I’m getting…

2010-08-27 21:53:17.971 SportWatch[1299:307] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-1262.58/UITableView.m:920
2010-08-27 21:53:17.992 SportWatch[1299:307] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (4) must be equal to the number of rows contained in that section before the update (4), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted).'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x35411ed3 __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x311f0811 objc_exception_throw + 24
    2   CoreFoundation                      0x35411d15 +[NSException raise:format:arguments:] + 68
    3   Foundation                          0x332b932f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 62
    4   UIKit                               0x338dcda1 -[UITableView(_UITableViewPrivate) _endCellAnimationsWithContext:] + 4524
    5   UIKit                               0x338d586d -[UITableView _updateRowsAtIndexPaths:updateAction:withRowAnimation:] + 204
    6   UIKit                               0x338d5775 -[UITableView deleteRowsAtIndexPaths:withRowAnimation:] + 20
    7   SportWatch                          0x000060e7 -[MainViewController tableView:commitEditingStyle:forRowAtIndexPath:] + 670
    8   UIKit                               0x338d3c3f -[UITableView(UITableViewInternal) animateDeletionOfRowWithCell:] + 58
    9   UIKit                               0x33984071 -[UITableViewCell(UITableViewCellInternal) deleteConfirmationControlWasClicked:] + 28
    10  CoreFoundation                      0x353b9719 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24
    11  UIKit                               0x33831d59 -[UIApplication sendAction:to:from:forEvent:] + 84
    12  UIKit                               0x33831cf9 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
    13  UIKit                               0x33831ccb -[UIControl sendAction:to:forEvent:] + 38
    14  UIKit                               0x33831a1d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
    15  UIKit                               0x3383206b -[UIControl touchesEnded:withEvent:] + 342
    16  UIKit                               0x338309f5 -[UIWindow _sendTouchesForEvent:] + 368
    17  UIKit                               0x3383036f -[UIWindow sendEvent:] + 262
    18  UIKit                               0x3382ae13 -[UIApplication sendEvent:] + 298
    19  UIKit                               0x3382a74b _UIApplicationHandleEvent + 5110
    20  GraphicsServices                    0x3171a04b PurpleEventCallback + 666
    21  CoreFoundation                      0x353a6ce3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
    22  CoreFoundation                      0x353a6ca7 __CFRunLoopDoSource1 + 166
    23  CoreFoundation                      0x3539956d __CFRunLoopRun + 520
    24  CoreFoundation                      0x35399277 CFRunLoopRunSpecific + 230
    25  CoreFoundation                      0x3539917f CFRunLoopRunInMode + 58
    26  GraphicsServices                    0x317195f3 GSEventRunModal + 114
    27  GraphicsServices                    0x3171969f GSEventRun + 62
    28  UIKit                               0x337d148b -[UIApplication _run] + 402
    29  UIKit                               0x337cf69f UIApplicationMain + 670
    30  SportWatch                          0x00002b23 main + 70
    31  SportWatch                          0x00002ad8 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
kill
Current language:  auto; currently objective-c
quit
  • 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-05-16T14:11:22+00:00Added an answer on May 16, 2026 at 2:11 pm

    remove the object from the data set before deleting the row.

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

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Dave Smith's answer was pretty close to what I needed… May 16, 2026 at 11:44 pm
  • Editorial Team
    Editorial Team added an answer The point of how singletons are handled in Spring is… May 16, 2026 at 11:44 pm
  • Editorial Team
    Editorial Team added an answer What about this ? // input array $arr = array('A','B','C','D','E','F');… May 16, 2026 at 11:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Having worked with Classic ASP for about 2 years now by creating a few
Having multiple indices for an SQL table, is there a way to know what
I've been desperately trying for about the last week to figure out whatever my
Am currently evaluating a build tool/framework. I need to meticulously record my findings and
Using subversion v1.6.6 and TortoiseSVN v1.6.6.. After having created a branch and meticuously adding
Having been a PHP developer on LAMP servers for quite a while, is there
Having a heckuva time with this one, though I feel I'm missing something obvious.
Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service
Having to upgrade a database schema makes installing a new release of software a
Having a problem getting a TreeView control to display node images. The code below

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.