I am using setURLSchemeHandler (with the WKURLSchemeHandler protocol) as follows:
let config = WKWebViewConfiguration()
config.setURLSchemeHandler(self, forURLScheme: "local")
WebView = WKWebView(frame: CGRect(x:0, y:0, width:self.view.frame.width, height:self.view.frame.height), configuration: config)
When I dismiss this viewcontroller, "deinit" is not called. Reason for this is using "self" in:
config.setURLSchemeHandler(self, forURLScheme: "local")
My question is, how to remove the scheme handler before dismissing the view?