I am trying to get WKUIDelegate to work and cannot get it to trigger my code. I have the protocol implemented in the header <WKNavigationDelegate, WKUIDelegate> and have set the delegates in the loadView:
(void)loadView
{
[super loadView];
webView.UIDelegate = self;
webView.navigationDelegate = self;
}
But it will not hit my code when the WKWebView loads on the view that should trigger this procedure:
(WKWebView*)webView:(WKWebView *)webView createWebViewWithConfiguration:(nonnull WKWebViewConfiguration *)configuration forNavigationAction:(nonnull WKNavigationAction *)navigationAction windowFeatures:(nonnull WKWindowFeatures *)windowFeatures {
NSLog(@"IT WORKED!");
return nil;
}
I have no idea what I'm doing wrong. I'm an experienced programmer, but not with XCode, I only use it every once in a while and am mostly a novice.
I'm trying to do what others have asked and want to use StoryBoards and still be able to share a common configuration that will allow shared cookies and sessions from what I understand.