好了,事情是这样的。我有一个体育应用程序,我想要更新比分(从网站解析),当视图出现或当用户滚动列表时,在表视图中。所以基本上更新单元格中存在的标签的文本,而不是仅仅将我的函数放在cellForRowAtIndex中,这会使性能变得很糟糕。
我尝试过使用NSURLConnection在表视图中异步加载图像,但没有成功(只有一个图像被加载到表中)。我想知道是否有人以前做过这件事,可以帮助我。
发布于 2011-02-18 06:36:48
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
Apple iOS reference library is here
NSArray *indexPaths = [[NSArray alloc] initWithObjects:[NSIndexPath indexPathForRow:row inSection:section], nil];
[(UITableView *)self.view reloadRowsAtIndexPaths: indexPaths
withRowAnimation: UITableViewRowAnimationTop];
[indexPaths release];
https://stackoverflow.com/questions/5038326
复制相似问题