UITableView回滚到顶部的几种方法
2016-02-19 17:04
573 查看
//***************方法一***************// //回滚到表的最顶端 [self.tableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; //***************方法二***************// [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; //***************方法三***************// NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0]; [self.tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];
相关文章推荐
- 深入学习:NSOperationQueue, NSRunLoop和线程安全
- ReferenceQueue
- UI总结
- UIButton.titleLabel.text和[UIButton setTitle:],UIButton.imageView.image和[UIButton setImage]的区别
- UICollectionView
- UISlider增加触动区域
- UICollectionView
- UIScrollView的三个属性
- WinCE Overlay - 示例:mosquito
- 22个值得收藏的android开源代码-UI篇
- 毕业设计(二十)---使用easyUI dialog 对话框做登陆弹出 表单验证
- 13.UILabel 中的一些属性
- Multiple build commands for output file
- 使用BlockingQueue实现包饺子( 生产者做面皮,消费者拿面皮包饺子)简单使用
- 《代码大全》之错误处理技术(Error-Handling Techniques)
- QT笔记:数据库总结(二)之SQL模型类-QSqlQueryModel模型
- UITabbarController左右滑动切换标签页
- event.returnValue=false和return false的用处
- poj1141 Brackets Sequence(区间dp)
- BlueStacks 使用说明