单独刷新tableView的段或者行

//一段刷新     
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];     
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationA utomatic];     
//一行刷新     
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];     
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationN one];  

注:如果有增加或删减的东西是否需要改变段高或者行高.

猜你喜欢

转载自blog.csdn.net/lichuanliangios/article/details/46011567
今日推荐