标签:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
CGPoint contentOffsetPoint = self.tableView.contentOffset;
if (contentOffsetPoint.y > 0) {
backTopBtn.hidden = NO;
} else {
backTopBtn.hidden = YES;
}
}
// 回到顶部按钮的点击事件
- (void)backTopBtnClick{
[self.tableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO];
backTopBtn.hidden = YES;
}
标签:
原文地址:http://www.cnblogs.com/Dandan-King/p/5340098.html