Questions tagged [wkuidelegate]
8 questions
5
votes
1 answer
uiDelegate method create webview with configuration not called
I have assigned delegate to wkwebview uiDelegate and implemented it's method create web view with configuration, but it is not being called. I have even placed breakpoint but it is not hitting.
class ViewController: UIViewController, WKUIDelegate,…

chetan panchal
- 181
- 2
- 11
3
votes
0 answers
webView:shouldPreviewElement: of WKUIDelegate is not called
I've implemented a view controller which is displaying a WKWebView. The web view displays certain pages containing links with a tags, e. g.:
Issue
I would like to add a preview to…

clemens
- 16,716
- 11
- 50
- 65
2
votes
1 answer
WKWebView does not trigger method createWebViewWithConfiguration
I'm trying to run Javascript within in a HTML Source. The code inside is suppose to open a new window with another HTML Source I given. What's my mistake here?
(My goal is to prove the WKWebView has ability in opening nested popup window) Meaning…

Tommy Leong
- 2,509
- 6
- 30
- 54
2
votes
3 answers
Window.open() is not working in WKWebView
I am trying to open a URL in safari browser while clicking it from app's iOS WKWebView, but when I call window.open() from javascript which has no effects.
It's not hitting the decide policy in…

Karthik
- 405
- 7
- 15
1
vote
2 answers
Assertion failure in -[UIAlertController addTextFieldWithConfigurationHandler:]
Invoking window.prompt in JavaScript within a WKWebView generates an assertion error:
Assertion failure in -[UIAlertController
addTextFieldWithConfigurationHandler:]
The assertion error comes from this WKUIDelegate function:
func webView(_…

Crashalot
- 33,605
- 61
- 269
- 439
0
votes
1 answer
How should I disable this menu display on the iPadOS 16 webview, when clicking with two fingers on the trackpad of the Magic Keyboard
Thanks(https://i.stack.imgur.com/Nz2fD.png)
I try to implement this method of WKUIDelegate, but it doesn't work
@available(iOS 13.0, *)
public func webView(_ webView: WKWebView, contextMenuConfigurationForElement elementInfo:…

zeus J
- 1
0
votes
1 answer
Unable to open external link in safari using WKWebView
I am migrating from UIWebView to WKWebView. Need to load HTML content in WKWebView everything is working fine but the problem is unable to open link in the external safari browser after a click on any link from WKWebView. I used below…

sham
- 115
- 9
0
votes
1 answer
Adding cookies to a webview.load in Swift
I tried to add a Webpage to my App(that works) but when I try to add cookies it gave me this error : "Cannot invoke 'load' with an argument list of type '(URLRequest, with: HTTPCookie?)'"
let cookie1 = HTTPCookie(properties: [
…

Daniel Haider
- 3
- 1