美文网首页iOS 深度好文
IOS TableView更新某一组某一行

IOS TableView更新某一组某一行

作者: 念念不忘的旧时光 | 来源:发表于2016-07-19 14:35 被阅读1111次

//一个section刷新

NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:1]; //你需要更新的组数

[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];  //collection 相同

//一个cell刷新

NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];  //你需要更新的组数中的cell

[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];//collection 相同

相关文章

网友评论

    本文标题: IOS TableView更新某一组某一行

    本文链接:https://www.haomeiwen.com/subject/vnbmjttx.html