I am learning how to work with TableViews and I am wondering how can I figure out if the tableView is scrolling up or down ? I been trying various things such as this but it
You can implement scrollViewWillEndDragging method:
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) {
if targetContentOffset.pointee.y < scrollView.contentOffset.y {
// it's going up
} else {
// it's going down
}
}