I have a scrollView. Typical tableView Cell. I did things a lot on viewDidScroll.
viewDidScroll is called on 2 cases.
- User scroll
- Sometimes user have stop scrolling but the scrollview still scroll anyway due to momentum, bouncing, etc.
So how do I know if users are still touching the scrollView?
UIScrollViewhas aBOOLproperty namedtrackingthat isYESwhile the scroll view has a touch andNOotherwise. In my testing, it is set toNOas soon as the touch ends, even if the view is decelerating (and still sendingscrollViewDidScroll:to its delegate). This seems like exactly what you are asking for.In my testing, the
draggingproperty doesn’t seem to becomeNOreliably while the view is decelerating after the touch ends.The
deceleratingproperty is also unreliable in my testing. If I touch the scroll view while it is decelerating,deceleratingremainsYESeven though the view has stopped scrolling.