I have this problem, and I can't find any other mention of this anywhere.
Basically, if I disable bouncing in a UIScrollView (so derivatives such as UITableView are also affected) it's possible to get the scroll indicator stuck if a user scrolls to the top, and then, with another gesture, tries to continue scrolling using a quick swipe.
Once this happens, the scroll indicator will not disappear unless a user scrolls again or taps the scrollview. The biggest issue is that the scrollview will capture that tap and so if you try to tap on say a table cell, nothing will happen the first time.
I've tested this with just a barebones app on both my device and the simulator, and it seems to just be a general issue with UIScrollView and disabling bouncing; however, like I said I can't find any other mention of this on the internet.
Is this just a bug? Is this expected behavior? Am I doing something wrong? If this is a bug, then does anyone know of a work-around or fix?
In my case, I had two UIScrollView
s, one nested inside the other.
When inner scroll view reached the top, I forcibly set the contentOffset.y
to 0
(I need this to allow outer scroll view begin scrolling its content view). This caused the scroll view undesired behavior described in this question.
The fix was setting the contentOffset.y
to -1
, which allowed the scroll view scroll back to 0 naturally (by itself), and the hung behavior was dismissed.
Hope this helps the others ✋
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With