我的iPhone应用中有一个UIWebView
,其网页上有几个按钮,每个按钮都有一个特殊的URL
。
有没有办法检测在此特定UIWebView
点击网址的时间?
答案 0 :(得分:-3)
-(void)ButtonPressed:(id)sender {
UIButton *btnCurrent = (UIButton*)sender;
NSLog(@"sender%@",sender);
NSString *str = [NSString stringWithFormat:@"%d",btnCurrent.tag];
strRID =str;
if ([str isEqualToString:@"0"]) {
NSURL *urldata = [NSURL URLWithString:strLink];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:urldata];
[self.webRegister setScalesPageToFit:YES];
[self.webRegister loadRequest:request];
[request release];
[super viewDidLoad];
strLink=@"";
}
}