我有一个 uiwebview 我在其中打开http://google.com。然后我在谷歌搜索栏中输入一些东西并搜索一些东西。我想获取由于我在 google 上搜索而生成的更新后的 url。
- (void)viewDidLoad
{
[super viewDidLoad];
[self setUrlAddress:@"http://google.com.pk"];
// Do any additional setup after loading the view from its nib.
NSURL *url = [NSURL URLWithString:self.urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[self.webView setScalesPageToFit:YES];
[self.webView loadRequest:requestObj];
}
- (void)webViewDidStartLoad:(UIWebView *)webView{
[appDelegate showActivityView:self.view];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView{
[appDelegate hideActivityView];
}