2

我的UIWebViewiPhone 应用程序中有一个带有几个按钮的网页,每个按钮都有一个特殊的URL.

有什么方法可以检测在此特定中单击 URL 的时间UIWebView

4

1 回答 1

-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=@"";
     }
 }
于 2012-06-19T08:42:41.467 回答