X0r0N
X0r0N

Reputation: 1934

UIWebview on scroll event

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?

Upvotes: 0

Views: 7970

Answers (1)

Kumar KL
Kumar KL

Reputation: 15335

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

Upvotes: 12

Related Questions