您的位置:首页 > 产品设计 > UI/UE

UITableView刷新指定section、cell

2016-02-29 13:08 429 查看
UITableView有时候需要对特定的section或cell进行刷新,可以尝试以下方法:

//刷新特定section
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:7];
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
//刷新特定cell
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:2 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: