基础部分

tableView刷新

2017-06-10  本文已影响29人  春暖花已开

因为以前开发都是刷新整张表,现在把刷新指定的组和指定行的方法贴出来:

//刷新整个tableView
[tableView reloadData];
//一个section刷新
[tableview reloadSections:[NSIndexSet indexSetWithIndex:2] withRowAnimation:UITableViewRowAnimationAutomatic];
//一个cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
上一篇 下一篇

猜你喜欢

热点阅读