I am attempting to disable scrolling a UIScrollView
after scrollViewDidEndDragging
is called. I want the UIScrollView
to only scroll when the user is scrolling with his/her finger. I haven't found a good way to implement this yet. I have attempting to disable and the enable scrolling, but when I use a flick motion to scroll, the UIScrollView
continues scrolling. What I have in my code right now is:
func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
scrollView.setContentOffset(self.contentOffset, animated: false)
scrollView.scrollEnabled = false
scrollView.scrollEnabled = true
...
}
Does anyone know how to immediately stop scrolling if a flick scroll motion is performed?