TableView回滚顶部的三种方法

1.

[self.table  scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO];

2.

[self.table setContentOffset:CGPointMake(0,0) animated:NO];

3.

NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0];

[self.table scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];

 

posted @ 2017-07-10 14:41  鸢一  阅读(399)  评论(0编辑  收藏  举报