Reputation: 27827
I'm seeing a lot of answers on how to disable scrolling in a web view, but what I'm after is different: say the user is scrolling the webview, and the finger is not on the device anymore, but it's still scrolling (it hasn't stopped, but it's decelerating, this can take up to a second or so). Then, they tap a button. I want the UIWebView to stop scrolling immediately (i.e. cancel its current scrolling). Is this possible?
Upvotes: 2
Views: 1069
Reputation: 6976
The UIWebView class conforms to the UIScrollViewDelegate, thus by using this answer here: How can I programmatically force-stop scrolling in a UIScrollView? you can stop scrolling by manually setting the content offset.
Upvotes: 2