美文网首页TableView & Cell小知识点好东西
指定某个 cell 刷新某个cell数据

指定某个 cell 刷新某个cell数据

作者: 我的天空蔚蓝色 | 来源:发表于2015-11-28 11:04 被阅读893次
    • 指定某个 cell
     UITableViewCell *cell = [weakSelf.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:3 inSection:0]]; 
    
    • 刷新某个cell数据
     NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
    [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone]; 
    
    • 刷新某一个section刷新
     NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
    [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
    

    相关文章

      网友评论

        本文标题:指定某个 cell 刷新某个cell数据

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