我必须重新加载新的请求网址,但如果我尝试这样做,它会显示以前的网址。我还尝试在加载新请求之前加载空白。但它也不会起作用。
NSString * urlStr = [NSString stringWithFormat:@" https://www.google.com"];
webView_ = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.containerView.frame.size.width, self.containerView.frame.size.height) configuration:configuration];
webView_.autoresizingMask = UIViewAutoresizingFlexibleTopMargin| UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
webView_.opaque = false;
webView_.navigationDelegate = self;
webView_.UIDelegate = self;
[webView_ loadRequest:nsrequest];
[self.containerView addSubview:webView_];
// [configuration.userContentController addScriptMessageHandler:self name:@" interOp"];
navbar