if u want to open in same window
or if u want to open in popup. create new wkwebview and add to parent view.
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures { if (!navigationAction.targetFrame.isMainFrame) { [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [self.webView loadRequest:navigationAction.request]; } return nil;}or if u want to open in popup. create new wkwebview and add to parent view.
-(WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
self.popWindow =[[WKWebView alloc] initWithFrame:CGRectMake(25, 25, self.view.frame.size.height - 6, self.view.frame.size.width -94) configuration:configuration];
_popWindow.navigationDelegate = self;
_popWindow.UIDelegate = self;
[wkWebView addSubview:_popUpView];
[wkWebView addSubview:_popUpView];
return _popWindow;
}
No comments:
Post a Comment