Possible Duplicate:
Is it possible to refresh a single UITableViewCell in a UITableView?
In a sequence I am updating only a particular object in my list data(NSMUtableArray), once updated its value, To make the GUI update, I was reloaded the full table like below...
[table reloadData];
It worked fine, However in efficiency point, it is hanging little bit while I am scrolling, Is there any way to update only a particular cell without reload full table?
thanks.
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
Use this
You can use this..
NSArray *indexPathArray = [NSArray arrayWithObject:[NSIndexPath indexPathForRow:1 inSection:0]];
//You can add one or more indexPath in this array...
[tblview reloadRowsAtIndexPaths:indexPathArray withRowAnimation:UITableViewRowAnimationFade];
You can get the cell object by -
UITableViewCell *cell = [table cellForRowAtIndexPath:indexPath];
now change its related values as per your object from data array. It should reflect in the table. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With