美文网首页iOS经验总结
iOS UITableView局部刷新 刷新单个cell或sec

iOS UITableView局部刷新 刷新单个cell或sec

作者: 施主小欣 | 来源:发表于2018-09-25 14:59 被阅读17次
    镇楼

    //一个section刷新

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

    [tableview reloadSections: indexSet withRowAnimation:UITableViewRowAnimationAutomatic];

    //刷新单个Cell
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:2 inSection:1];

    [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];

    相关文章

      网友评论

        本文标题:iOS UITableView局部刷新 刷新单个cell或sec

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