- (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];
就可以了