- 滾動(dòng)到頂部
scrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)
- 上拉下拉的判斷
if scrollView.contentOffset.y < -100 {
// 下拉
}
if scrollView.bounds.size.height + scrollView.contentOffset.y > scrollView.contentSize.height {
// 上拉
}