【转】UIWebView获取当前页面url的两种方法
方法1:NSString *location =[webView stringByEvaluatingJavaScriptFromString:@"document.location"];
方法2:NSLog(@"webView
location = '%@'", webView.request.URL.absoluteString);
以上两种一定要放在页面成功加载之后才可以的!
方法1:NSString *location =[webView stringByEvaluatingJavaScriptFromString:@"document.location"];