I hava an app that launches Safari within the app. I can detect whether a link has been clicked or a searched being performed on the Safari.
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
//NSLog(@"uiwebview navigation type: %d", navigationType);
NSString *strNewURL = @"";
NSString *strURL = @"";
NSString *strBody = @"";
switch (navigationType) {
case 0:
NSLog(@"UIWebViewNavigationTypeLinkClicked:");
break;
case 1:
NSLog(@"UIWebViewNavigationTypeFormSubmitted:");
break;
case 2:
NSLog(@"UIWebViewNavigationTypeBackForward:");
break;
case 3:
NSLog(@"UIWebViewNavigationTypeReload:");
break;
case 4:
NSLog(@"UIWebViewNavigationTypeFormResubmitted:");
break;
case 5:
NSLog(@"UIWebViewNavigationTypeOther:");
break;
default:
break;
}
return YES;
}
However, I have no idea on how to detect when a picture is being swiped(Say there is an image in the centre of your page. When you swipe, it changes to next/previous image on the same page). And whether is it possible to get the name of the image or the URL of the image?
Note:
- Swiping does not change the URL
Thanks in advance! :)