New*_*bee 17 iphone objective-c uitableview ios
在一个序列中,我只更新列表数据中的特定对象(NSMUtableArray),一旦更新了它的值,为了进行GUI更新,我重新加载了如下所示的完整表...
[table reloadData];
Run Code Online (Sandbox Code Playgroud)
它工作正常,但在效率方面,它在我滚动时有点悬挂,有没有办法只更新一个特定的单元格而不重新加载全表?
谢谢.
ama*_*mar 31
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
Run Code Online (Sandbox Code Playgroud)
用这个
你可以用这个..
NSArray *indexPathArray = [NSArray arrayWithObject:[NSIndexPath indexPathForRow:1 inSection:0]];
//You can add one or more indexPath in this array...
[tblview reloadRowsAtIndexPaths:indexPathArray withRowAnimation:UITableViewRowAnimationFade];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
42899 次 |
| 最近记录: |