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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:04:19+00:00 2026-05-29T22:04:19+00:00

Something weird is going on with my tableview when changing data. I have something

  • 0

Something weird is going on with my tableview when changing data. I have something like this:

// fadeout existing data
... // change data (new values for the cells are blank)
for{ // loop all rows
[TableView reloadRowsAtIndexPaths: withRowAnimation:]; // smooth fade out
}

// add one new row to the table
... // change data (just add one new row but leave the cells empty)
[TableView reloadData] // reload all of the data (new row should be added)

... // change data (just add values to the existing cells)
for{ // loop all rows
[TableView reloadRowsAtIndexPaths: withRowAnimation:]; // smooth fade in
}

In theory, at least what I think, this should work. But I had some glitches so I added NSLogs in the for loops and in the: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath so I noticed that my [tableView reloadData] executes after the first row of fade in loop!@#

I was thinking about making some kind of a delay between reloadData and fade in loop, but I don’t want to force it to work, I want it to work properly.

  • Is there a better way to accomplish what I’m trying to do?
  • Can I dynamically add one row at the bottom of the table without calling the ‘reloadData’ method?

Thanks.

  • 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-29T22:04:21+00:00Added an answer on May 29, 2026 at 10:04 pm

    Yes, just use the tableView insertRowsAtIndexPaths method, which will then call your dataSource to load those new rows.

    To load a single row at the end of your table, you’d first update your data source to include the new row, then generate the indexpath using:

    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[yourdata count]-1 inSection:0];
    NSArray *indexPaths = [NSArray arrayWithObject:indexPath];
    [tableView insertRowsAtIndexpaths:indexPaths withRowAnimation:whateveryouwant];
    

    Remember, that will immediately call your tableView:cellForRowAtIndexPath method, so update your dataSource to include the extra row before inserting the new row into your table, and be careful that the row index in the indexPath you specify matches the newly added item in your data source.

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

Sidebar

Related Questions

Sounds like a weird question, but say I have something like this: $.post( /myajax.php,
I have something like this going on in my Java program: void f(Object o)
I have something weird going on here. I just finished a site for a
This is a weird bug. I know it's something funky going on with my
I have something really weird going on in my project (Flash CS5.5 and AIR
I have something of a weird situation going on. I'm trying to build a
I have something weird going on with using UINib, although I suspect the real
There is something weird going on in my code so i have to ask.
Something really weird is going on with Xcode and an iPhone project I'm working
I would like to throw an exception when my C++ methods encounter something weird

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.