方法一: [self.tableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; 此方法屡试不爽 无明显bug
方法二: [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; 此方法当tableView contentoffset不是很多的时候 滚到最顶部是没问题 当偏移量比较大有时候就不回滚到最顶部 问题原因未知
方法一: [self.tableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; 此方法屡试不爽 无明显bug
方法二: [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; 此方法当tableView contentoffset不是很多的时候 滚到最顶部是没问题 当偏移量比较大有时候就不回滚到最顶部 问题原因未知
本文标题:iOS tableView滚到最顶部
本文链接:https://www.haomeiwen.com/subject/vxnuoxtx.html
网友评论