通常刷新整个列表 我们都使用[self.tableView reloadData];

有的时候,有变化更新的只是某一行 row 或者是某个section 所以只更新这一行就好了

//一个section刷新
int section_index=;//更新第11个sectioin
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:section_index] withRowAnimation:UITableViewRowAnimationNone];
//一个cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow: inSection:]; //更新 第一个section的第4行
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];

IOS UITableView reload 刷新某一个cell 或 section的更多相关文章

  1. ios UITableview 刷新某一个cell 或 section

    //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:]; [tableview reloadSections:ind ...

  2. UITableview刷新某一个cell或section

    //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:in ...

  3. iOS TableView如何刷新指定的cell或section

    指定的section单独刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:indexPath.row]; [tableview relo ...

  4. iOS - UITableView中有两种重用Cell的方法

    UITableView中有两种重用Cell的方法: - (id)dequeueReusableCellWithIdentifier:(NSString *)identifier; - (id)dequ ...

  5. [IOS 开发]TableView如何刷新指定的cell 或section

    //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:]; [tableview reloadSections:ind ...

  6. iOS: TableView如何刷新指定的cell 或section

    //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:in ...

  7. iOS UITableView获取特定位置的cell

    代码地址如下:http://www.demodashi.com/demo/13307.html 一.tableView双级联动 以上两种效果比较类似,实现的关键在于都是需要获得在滑动过程中滑动到tab ...

  8. TableView刷新指定的cell 或section

    //一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:]; [tableview reloadSections:ind ...

  9. tableView刷新指定的cell 或section和滚动到指定的位置

    转自:http://blog.csdn.net/tianyou_code/article/details/54426494 //一个section刷新 NSIndexSet *indexSet=[[N ...

随机推荐

  1. 多源最短路径Floyd算法

    多源最短路径是求图中任意两点间的最短路,采用动态规划算法,也称为Floyd算法.将顶点编号为0,1,2...n-1首先定义dis[i][j][k]为顶点 i 到 j 的最短路径,且这条路径只经过最大编 ...

  2. 防止sql注入和跨站脚本攻击,跨站请求伪造以及一句话木马的学习记录

    以下是来自精通脚本黑客的学习记录 防止以上漏洞的最好的方式 一对用户的输入进行编码,对用户输入进行编码,然后存入数据库,取出时解码成utf-8 二对用户的输入进行过滤,过滤jscript,javasc ...

  3. 窗体皮肤实现 - 增加Toolbar的交互性

    稍微改造一下,让交互性更好点.增加提示和动态效果. 控件实现内容: 1.加入Hint提示 2.加入了简易动画效果,鼠标进入和离开会有个渐变效果. 实现方案: 1.基类选用 2.Action的关联 3. ...

  4. 2017.2.7 开涛shiro教程-第六章-Realm及相关对象(一)

    原博客地址:http://jinnianshilongnian.iteye.com/blog/2018398 根据下载的pdf学习. 第六章 Realm及相关对象 1.用户.角色.权限的关系 用户和角 ...

  5. git-for-windows 安装无图标的问题

    git-for-windows.ico 安装无图标的问题 一. 问题表现: 桌面图标与右建菜单图标,所是未知文件的图标, 二. 问题解决: 在shard/git/ copy 一个ico 文件(如git ...

  6. leetcode 46-Permutations and 47-Permutations II

    Permutations Given a collection of numbers, return all possible permutations. For example, [1,2,3] h ...

  7. 【Python】删除字符串的空白

    在程序中,额外的空白可能让人迷惑,对于程序员来说,'python'跟'python '看起来几乎一样,但是对于程序来说,可是千差万别 (lstrip)删除开头空白 >>> Langu ...

  8. js:argument

    引用:http://www.cnblogs.com/lwbqqyumidi/archive/2012/12/03/2799833.html    http://www.cnblogs.com/Fskj ...

  9. Android自动滚动 轮播循环的ViewPager

    主要介绍如何实现ViewPager自动播放,循环滚动的效果及使用.顺便解决ViewPager嵌套(ViewPager inside ViewPager)影响触摸滑动及ViewPager滑动速度设置问题 ...

  10. 怎样给filter加入自己定义接口

    .在Cfilter类的定义中实现Interface接口的函数的定义: //-----------------------Interface methods----------------------- ...