UITableView技巧总结
2015-11-25 本文已影响43人
BlessNeo
1. 刷新UITableView的某一section或row的数据、UI
//刷新某一个section
NSIndexSet *indexSet=[[NSIndexSet alloc] initWithIndex:2];
[tableview reloadSections:indexSet
withRowAnimation:UITableViewRowAnimationNone];
//刷新某一个cell
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:1 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil]
withRowAnimation:UITableViewRowAnimationNone];