- (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 = [onePicGifTableViewCell heightCell];
就可以了
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)