Hey StackOverflow People,
I\'ve been trying to figure out this question for some time now but to no avail and I need some help. I have a UITableView
close t
For Swift 3.2 and above :
var canRefresh = true
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if scrollView.contentOffset.y < -100 {
if canRefresh && !self.refreshControl.isRefreshing {
self.canRefresh = false
self.refreshControl.beginRefreshing()
self.handleRefresh()
}
} else if scrollView.contentOffset.y >= 0 {
self.canRefresh = true
}
}