Take the 2-minute tour ×

I have a UITableView that contain about 20 rows in the iPad's viewport. I have a interval timer that will call UITableView's reloadData regularly(post it to UI thread).

Now when I scroll through the UITableView with medium speed (not so fast), that UITableView will refresh with flickering effect.

I have to write a function to manually update the UITableViewCell label by looping through all the items in the array (this array keep all the items that show on UITableView). I will execute this function when timer is running instead of calling reloadData (as I mentioned above). Then the flickering issue is gone.

I believe that reloadData should be better than looping through all the data because reloadData will only refresh the current showing Cells instead of all the rows, but I couldn't figure out why the flickering happens. Anyone know why?

One thing I have to mention is I did use the CellIdentifier correctly to reuse the cell and only create the cell when the retrieved cell is null.

Moreover, I do not have this issue in iPhone and I believe that it is because iPhone has lesser row compare to iPad.

Anyone can give some explanation about this issue?

share|improve this question
have you try with [tblMsgConverstion beginUpdates];[tblMsgConverstion endUpdates];? –  Nitin Gohel Apr 11 '13 at 5:03
@NitinGohel hi, do you mind to elaborate how to do that? put reloadData between beginUpdates and endUpdates? –  GMsoF Apr 12 '13 at 4:16
add comment

2 Answers

up vote 2 down vote accepted

I had the same problem with flickering when using reloadData. I solved it by using indexPathsForVisibleRows and cellForRowAtIndexPath: to only update the visible cells. Performance is good since I don't have to iterate over the whole data set, but only a limited number of visible cells.

share|improve this answer
add comment

reloadData causes the tableview to recreate the visible cells on screen which can result in a flickering since the cells get destroyed. There are better ways to reload the tableview. Are you using Core Data? If so the NSFetchedResultsController and it's delegate are a great way to update a tableview since it listens to changes in the underlying datasource and only updates the appropriate cells.

share|improve this answer
add comment

Your Answer


