美文网首页
iOS UITableView scrollToRowAtInd

iOS UITableView scrollToRowAtInd

作者: pokeey | 来源:发表于2019-11-11 12:55 被阅读0次

有时当调用tablebview滚动方法失效

 scrollToRowAtIndexPath: atScrollPosition: animated:

需先布局动态计算行高才知道行高,所以tableview在未渲染之前不知道下面的行高是多少,这个时候需要先在代理上返回一个大概的值,这样就算没有加载到也能大概进行scrollToRowAtIndexPath

相关文章

网友评论

      本文标题:iOS UITableView scrollToRowAtInd

      本文链接:https://www.haomeiwen.com/subject/uwhtictx.html