滚动指定UITableViewCell到顶部
2015-12-04 14:26
453 查看
我想使TableView滚动到指定位置(有些tableView我想滚动到Row=5)所以我用下下面的方法(但会报错):
解决方法:
or
swift
StackOverFlow
[mainTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
解决方法:
[mainTableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
or
[mainTableView setContentOffset:CGPointZero animated:YES];
swift
mainTableView.setContentOffset(CGPointZero, animated:true)
StackOverFlow
相关文章推荐
- Build Settings中的变量@rpath,@loader_path,@executable_path
- UI视图控件、视图嵌套、SubView、Tag 的使用
- Android UICC 实现框架和数据读写
- LeetCode(304)Range Sum Query 2D - Immutable
- LeetCode(304)Range Sum Query 2D - Immutable
- easyui-slider
- IOS 高斯模糊 (毛玻璃效果 UIVisualEffect)
- String的substring和subSequence的区别
- 关于uitableview上面的一块空白的问题
- django的request对象和response对象
- easyui--datetiembox日期组件
- iOS开发-UI控件:关于使用UISearchDisplayController
- [APUE]再读之 标准IO库
- easyui--timespinner时间微调组件
- 解决Value '0000-00-00 ' can not be represented as java.sql.Timest
- easyui--spinner
- spoj375 Query on a tree(树链剖分 边权 入门题)
- [MSSQL]在T-SQL语句中访问远程数据库(openrowset/opendatasource/openquery)
- 键盘(UITextInputTraits)
- Ⅰ.15 如何修改Squish函数