TableView刷新 局部刷新等

1.对整个页面刷新

[ tableView reloadData];

2.对某一个section刷新

    NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];

    [tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];

3.对cell刷新

     NSIndexPath *indexPath = [NSIndexPath indexPathForRow:2 inSection:0];

     //数组 也就是可以多个cell

    [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic];

 

posted @ 2015-12-17 11:15  fengkuangIT  阅读(196)  评论(0编辑  收藏  举报