问题
I want to know how to call a method in the event that a user has stopped scrolling on a page inside UIWebview.
Does anyone know how to do this?
回答1:
UIScrollView has also a subView of the UIWebView :
So you can fire at the delegate of UIScrollView's :
webView.scrollView.delegate = self
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
//Do your Stuff
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView
willDecelerate:(BOOL)decelerate
{
if (!decelerate) {
//Do your Stuff
}
}
Check the Doc
来源:https://stackoverflow.com/questions/23029741/uiwebview-on-scroll-event