UIWebview on scroll event

蓝咒 提交于 2019-12-12 01:45:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!