I had the same problem and asked our UX-Designer how it would be better to do this. He said that strict decisions (to prevent bouncing, and to allow it as it is) are bad. Better to allow a jump, but only for some space
My solution was:
override func scrollViewDidScroll(_ scrollView: UIScrollView) { if scrollView == self.tableView { if scrollView.contentOffset.y < -64 { scrollView.scrollRectToVisible(CGRect(origin: CGPoint(x: 0, y: -64), size: scrollView.frame.size), animated: false) scrollView.scrollRectToVisible(CGRect(origin: CGPoint.zero, size: scrollView.frame.size), animated: true) } } }
Where 64 was for me "some space". The code stops the tableView at -64 from above and displays it using animation. Good luck
source share