I\'m looking to detect if (not when) a UIScrollView
is scrolling.
i.e.
BOOL isScrolling = myscrollview.scrolling;
How woul
Not a very clean solution .. but should be the most reliable:
var isScrolling = false
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
isScrolling = true
}
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
if !decelerate { scrollViewDidEndScrolling(scrollView) }
}
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
scrollViewDidEndScrolling(scrollView)
}
func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
scrollViewDidEndScrolling(scrollView)
}
func scrollViewDidEndScrolling(_ scrollView: UIScrollView) {
isScrolling = false
}