我有一个应用程序在应用程序中启动Safari。我可以检测是否已点击链接或在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;
}
但是,我不知道如何检测图片的刷卡时间(假设页面中央有图像。当您滑动时,它会切换到同一页面上的下一张/上一张图像)。是否可以获取图像的名称或图像的URL?
注意:
提前致谢! :)