scrollToRowAtIndexPath 导致Footer漏出来了
iCloudys opened this issue · comments
iCloudys commented
描述bug
UITableView使用scrollToRowAtIndexPath方法后,底部的footer漏出来了,但是稍微滚动一下屏幕就恢复正常了,这里是最小Demo,直接运行到模拟器等待3s即可自动复现
MJFooterDemo.zip
必现/偶发?
必现
怎么样重现这个bug
- 显示哪个页面
直接运行提供的demo就行 - 点击哪个位置
等到3s,会自动触发bug - 滚动到哪个位置
- 发生了什么错误
footer漏出来了
你期望的结果是什么?
期望footer不要漏出来,和正常滚动一样
截图
如果有必要的话,请上传几张截图
运行环境
- iPhone6
- iOS8.1
- Xcode10
最好能提供出现bug的Demo
iCloudys commented
自问自答一下吧,暂时使用此方法解决了,坐等大神提供方案 CGRect rect = [self.tableView rectForRowAtIndexPath:indexPath]; [self.tableView setContentOffset:rect.origin animated:NO];