转自:http://blog.csdn.net/tianyou_code/article/details/54426494

//一个section刷新      

NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:];
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic]; //一个cell刷新 NSIndexPath *indexPath=[NSIndexPath indexPathForRow: inSection:];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone]; // 滚动到指定位置
[self.tableView reloadData];
NSIndexPath * dayOne = [NSIndexPath indexPathForRow: inSection:];
[self.tableView scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:YES];

tableView刷新指定的cell 或section和滚动到指定的位置的更多相关文章

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

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

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

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

  3. TableView刷新指定的cell 或section

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

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

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

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

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

  6. UITableview刷新某一个cell或section

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

  7. IOS UITableView reload 刷新某一个cell 或 section

    通常刷新整个列表 我们都使用[self.tableView reloadData]; 有的时候,有变化更新的只是某一行 row 或者是某个section 所以只更新这一行就好了 //一个section ...

  8. TableView刷新 局部刷新等

    1.对整个页面刷新 [ tableView reloadData]; 2.对某一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithI ...

  9. CollectioView滚动到指定section的方法

    项目中的需求:collectionView顶部有一个scrollView组成的标签,点击标签,让collectionView滚动到指定的行,滚动collectionView自动切换到顶部指定的标签 实 ...

随机推荐

  1. C++代码书写模板 -- 如何判断函数类型

    先说一个简单的方案. 经过验证 g++ 和 vs2010 都可以.原理就是利用函数类型可以直接转换成函数指针. template<class T> bool test( T * t ) { ...

  2. SQL还原数据库后,数据库显示受限制用户解决方法

    数据库->属性->选项

  3. BZOJ3231: [Sdoi2008]递归数列

    BZOJ3231: [Sdoi2008]递归数列 Description 一个由自然数组成的数列按下式定义: 对于i <= k:ai = bi 对于i > k: ai = c1ai-1 + ...

  4. RequestDispatcher用法

    1.具体用法: RequestDispatcher dispatcher = req.getRequestDispatcher("updateByUserId_001.jsp"); ...

  5. mongodb学习之:副本集

    前面一张介绍了主从模式,现在mongoDB官方已经不建议使用主从模式了,替代方案是采用副本集的模式.副本集不能在一台电脑上操作.需要准备3台电脑进行搭建.副本集就是mongoDB副本所组成的一个集群. ...

  6. cURL范例(包括错误输出和详情输出)

    //1.初始化 $ch = curl_init(); //2.设置选项,包括URL curl_setopt($ch, CURLOPT_URL, 'http://www.baidu.com'); cur ...

  7. 需要注意的一些Mysql语句

    1. 日期处理函数:date_format() select COUNT(*) from (SELECT SERIAL_NO, APPLY_SERIAL_NO, FLAG, PAY_DATE, SEQ ...

  8. MotionEvent分析及ImageView缩放实现

    这个类在各种View和用户的手势操作之间的交互存在很大的自定义空间.要理解清楚这个类的一些特性和意义,对自定义的新型控件很有帮助 先翻译一下开发者文档的描述 Overview Motion event ...

  9. 人生苦短之Python多线程

    #encoding=utf-8 import threading import time ''' python多线程并不是真正意义上的多线程,通常我们所说的多线程是多个线程同时执行某功能,而在pyth ...

  10. 如何刷新本地的DNS缓存?

    为了提高网站的访问速度,系统会在成功访问某网站后将该网站的域名.IP地址信息缓存到本地.下次访问该域名时直接通过IP进行访问.一些网站的域名没有变化,但IP地址发生变化,有可能因本地的DNS缓存没有刷 ...