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 914201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:40:51+00:00 2026-05-15T17:40:51+00:00

So I have a UITableView in which I am doing batch insert/delete/reloads into. Every

  • 0

So I have a UITableView in which I am doing batch insert/delete/reloads into. Every once in a while, the list data changes, so I batch update the differences in the list. I’m basically inserting new rows, deleting rows that are no longer there, and reloading rows that exist in both the old and new data. For example:

Before, the list data looks like this:
0: apple
1: banana
2: carrot

After, the list data looks like this:
0: banana
1: carrot
2: dog
3: elephant

This results in deleting row 0, reloading rows 1 and 2, and inserting at rows 2 and 3. The order I call the methods is also in this way: delete, then reload, then insert rows.

However, this results in a exception being thrown since I’m doing two different animations on row 2 (reloading and inserting). Is this an ordering issue, or are my indexPaths incorrect? Note: I need to reload old cells, since the data for that row may have changed, but should not be represented by an insertion/deletion.

Edit: Weirdly enough, this error only happens in iOS versions earlier than iOS4.

  • 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-15T17:40:52+00:00Added an answer on May 15, 2026 at 5:40 pm

    I’d say delete 0, and insert 3 and 4. Reloading shouldn’t be needed. The order in which you send the updates is irrelevant. Make sure that your model reflects the changes before you tell about the updates. Wrap the calls up with -beginUpdates: end -endUpdates:.

    Here is a link for batch update, see listing 7-8:
    https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html#//apple_ref/doc/uid/TP40007451-CH10-SW16

    The WWDC video hint is good, too. You want to look out for Session 128 – Mastering Table Views.

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

Sidebar

Related Questions

I have an UITableView which includes a list of UITableViewCells. And I set the
I have a list of tasks within Core Data. I fetch them into a
I have a UITableView which loads its data from the web. It takes a
I have a UITableView which generates its data from a pList. I have a
I have a UITableView which displays images. Every cell has an image and every
I have a UITableView which contains names in each row alongwith images for each
I have a UITableView which is configured to allow rows to be moved between
I have a UITableView which displays about 5 cells at a time, yet in
I have a UITableView which is backed by a NSFetchedResultsController . I would like
I have a UITableView which I want to populate with details from an array

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.