0

How Judgment webview page is loaded? Let me tell you the page is loading. Also, unable to open web pages loaded in Webview, like some of the below URLs.

- (void)awakeFromNib {
    NSString *urlString = @"http://www.google.com";
    // Insert code here to initialize your application 
    [[_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
}

- (IBAction)googleOpen:(id)sender {
    [_webView setMainFrameURL:@"http://www.google.com"];
}

- (IBAction)baiduOpen:(id)sender {
    [_webView setMainFrameURL:@"http://www.baidu.com"];
}

- (IBAction)yahooOpen:(id)sender {
    [_webView setMainFrameURL:@"http://www.yahoo.com"];
}

How can I open a URL with a way to pass parameters? enter image description here

Rob Keniger
  • 45,830
  • 6
  • 101
  • 134
小弟调调
  • 1,315
  • 1
  • 17
  • 33

1 Answers1

1
  1. If you want to know when a website has loaded, link the WebFrameLoadDelegate protocol, and implement webView:didFinishLoadForFrame: to know if the webpage has loaded.

  2. Use webView:didStartProvisionalLoadForFrame: to know if the webpage has start loading.

  3. Check your connection to the internet, and see if you can open the websites from another web browser. If it works, then check if your IBAction's are linked correctly to your buttons.

  4. What do you mean by open a URL with parameters? If you mean by having a textfield which allows users to search keywords on certain websites such as Google, just do http://www.google.com/search?q=%yoursearch, replacing %yoursearch with the users input.

TheAmateurProgrammer
  • 9,252
  • 8
  • 52
  • 71
  • I would like to open the link address in a web view which, And set the window size.Set the link address to open the window sizes like . – 小弟调调 Apr 22 '12 at 06:57