I want to get the scroll direction in webView. I read the code about getting scroll direction here.
-(void)userDidScrollWebView:(id)scrollPoint{
// NSLog(@"scrolled:::");
NSString *x1 = [webView stringByEvaluatingJavaScriptFromString: @"scrollX"];
NSString *y1 = [webView stringByEvaluatingJavaScriptFromString: @"scrollY"];
NSLog(@"scroll x=%@ y=%@", x1,y1);
if ([y1 isEqualToString: @"0"]) {
NSLog(@"RELAOD ME");
}
}
I have 2 Questions :-
About this code,I don't know where to call
userDidScrollWebView
method in my code so that I get regular updates about scrolling.Another approach, I thought may be I could place Swipe Gesture over Web View but that's not working.