当UITableView heightForRowAtIndexPath动态改变高度时 tableview向上滑动会jump 跳的问题
来源:互联网 发布:sql 相同字段数据合并 编辑:程序博客网 时间:2024/05/04 16:55
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
因为向上滑动先启动 cellForRowAtIndexPath 然后才是heightForRowAtIndexPath 所以cell的高度会先改变 heightForRowAtIndexPath来不及执行 cell的高度就改变了所以来不及跳转
解决方案 :
应该在return cell; 之前设置cell的高度
在
cellForRowAtIndexPath加上
self.rowHeight = [onePicGifTableViewCellheightCell];
就可以了阅读全文
0 0
- 当UITableView heightForRowAtIndexPath动态改变高度时 tableview向上滑动会jump 跳的问题
- 动态改变tableview的cell的高度
- iOS UITableView动态改变tableHeaderView的高度
- 怎么样动态改变UitableView header的高度
- ios TableView那些事(三十 五)TableView 单选操作使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- ios TableView那些事(三十 五)TableView 单选操作使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- UITableView动态改变Cell高度
- UITableView动态改变Cell高度
- UICollectionView 、UItableView 动态改变高度
- 向上滑动tableview 程序crash问题
- 关于IOS UITableView的动态高度问题
- iOS动态改变UITableView的tableViewHeader的高度
- UITableView:改变 TableHeaderView 的高度
- UITableView:改变 TableHeaderView 的高度
- UITableView:改变 TableHeaderView 的高度
- UITableView:改变 TableHeaderView 的高度
- UITableView中heightForRowAtIndexPath 产生 EXC_BAD_ACCESS 的原因
- UITableView中heightForRowAtIndexPath 产生 EXC_BAD_ACCESS 的原因
- python利用urllib下载文件到本地
- 信息学奥赛
- 计算机网络原理实验一--网线的制作
- hdu 4283 You Are the One 区间DP 解题报告
- ArgumentError: argument --positive_data_file: conflicting option string: --positive_data_file
- 当UITableView heightForRowAtIndexPath动态改变高度时 tableview向上滑动会jump 跳的问题
- linux Ubuntu 16.04 (一) 新手指南
- (转载)IT行业都有哪些职位,初学者(0基础,新人)该如何选择,才能够快速进入这个行业?
- HDU 1097 A hard puzzle
- 高内聚,低耦合
- maven需要的全部jar包!!!!!全全全
- C语言——简易的静态通讯录实现
- LeetCode 001 —— Two Sum
- 欢迎使用CSDN-markdown编辑器