//tableView:动态cell的高度不固定,滑动不到最顶部
//if (self.sensorDate.count > 0) {
// [self.tableView scrollToRow:0 inSection:0 atScrollPosition:UITableViewScrollPositionTop animated:NO];
// [self.tableView setContentOffset:CGPointZero animated:YES];
// [self.tableView setContentOffset:CGPointMake(0, 0)];
// [self.tableView scrollRectToVisible:CGRectMake(0,0,1,1) animated:YES];
// [self.tableView setContentOffset:CGPointZero animated:YES];
// }
// self.sensorDate = sensorArr;
[self.tableView reloadData];
[self.tableView layoutIfNeeded]; //这句是关键
[self.tableView setContentOffset:CGPointMake(,) animated:NO];
tableView刷新指定的cell 或section和滚动到指定的位置
//一个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];

最新文章

  1. Web 分页
  2. ibatis入门教程
  3. gcc警告: warning: dereferencing type-punned pointer will break strict-aliasing rules
  4. SQL Server 2008 修改表所有者,架构
  5. 【SQL 触发器】
  6. [转](一)unity4.6Ugui中文教程文档-------概要
  7. 学习之路三十二:VS调试的简单技巧
  8. No Entertainment!
  9. Python远程视频监控
  10. iOS 登陆之使用ShareSDK
  11. Pluto - iOS 上一个高性能的排版渲染引擎
  12. Android开发简易教程
  13. mySQL的行转列
  14. QT学习教程
  15. .NET的关于人脸识别引擎分享(C#)
  16. SA387Gr91
  17. Luogu P1318 积水面积
  18. 解决webstorm中测试dva项目run start命令需要不断重启问题
  19. P2762 太空飞行计划问题(网络流24题之一)
  20. C程序运行的背后(2)

热门文章

  1. GMA Round 1 奇怪的数列
  2. jQuery 学习01——定义、安装引用、语法、选择器及事件
  3. Redis连接出现Error: Connection reset by peer的问题是由于使用Redis的安全模式
  4. mysql select into 不支持
  5. idea 集成sonarLint检查代码bugs
  6. php读取ini配置文件属性
  7. Mybatis Generator配置详解
  8. vs visual stdio 调试 显示指针为数组
  9. shell 实例
  10. 利用cwRsync客户端将Windows下文件同步到Linux