【iOS|iOS 返回顶部】点击某个按钮回到顶部,例如:tableView、ScrollView等
1、
CGPoint offset = weakSelf.myScrollview.contentOffset;
offset.y = -weakSelf.myScrollview.contentInset.top;
[weakSelf.myScrollview setContentOffset:offset animated:YES];
2、
[self.myScrollview setContentOffset:CGPointMake(0, 0) animated:YES];
[self.myTabelView setContentOffset:CGPointMake(0, 0) animated:YES];