Questions tagged [uiwebviewdelegate]

The methods declared by the UIWebViewDelegate protocol allow the adopting delegate to respond to messages from the UIWebView class

The methods declared by the UIWebViewDelegate protocol allow the adopting delegate to respond to messages from the UIWebView class. On UIWebViewDelegate, you can find the following methods:

Loading Content

– webView:shouldStartLoadWithRequest:navigationType:

– webViewDidStartLoad:

– webViewDidFinishLoad:

– webView:didFailLoadWithError:

322 questions
1
vote
1 answer

Calling the delegate of a delegate

I'm working on an iPhone project where I've inherited someone else's code. I have a situation where viewController A has a UIWebView and it is set as the delegate of that UIWebView. I also have a Class B which is set as the delegate of…
Phil John
  • 1,225
  • 1
  • 15
  • 24
1
vote
0 answers

UIWebView deprecated / WKWebView

On the last publication of my application on the Apple Store, I received the email from Apple saying that "ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of app updates that use UIWebView APIs starting from December 2020" I…
dsea
  • 75
  • 3
  • 16
1
vote
0 answers

iOS 12.2 update stopped WebView from opening links in new browser window

The recent 12.2 update stopped some functionality in our WebView from working, strangely only on real devices--it works fine in simulators. When a link is clicked in the webview, some code determines whether the link should open in the webview, or…
timetofly
  • 2,957
  • 6
  • 36
  • 76
1
vote
1 answer

webViewDidFinishLoad not firing when UIWebView opens a PDF

Here is my code: - (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType; { /* Add Content Loading Banner */ if (navigationType ==…
Dan Hanly
  • 7,829
  • 13
  • 73
  • 134
1
vote
3 answers

Multiple UIWebViews, how do I track webViewDidFinishLoad for both?

I've tried: - (void) webViewDidFinishLoad:(UIWebView *)webView1{ } - (void) webViewDidFinishLoad:(UIWebView *)webView2{ } Errors are that I can't redefine the same method. If I have to use the same method, I need to figure out some way of…
Dan Hanly
  • 7,829
  • 13
  • 73
  • 134
1
vote
0 answers

iOS web view remove the history

How can I remove the history of web view so that webview's can go back method returns NO instead of Yes. Any ideas on how to do that I couldn't find any way to go back to the first page loaded in the URL. If I could get answer to any of these it'd…
Rajan M
  • 345
  • 3
  • 22
1
vote
1 answer

How to dismiss SFSafariViewController on UIView

class CustomScreen: UIView, SFSafariViewControllerDelegate { @IBAction func webPageBtnAction(_ sender: Any) { if #available(iOS 9.0, *) { let svc = SFSafariViewController(url: NSURL(string: "https://stackoverflow.com/")! as URL) …
dicle
  • 1,122
  • 1
  • 12
  • 40
1
vote
1 answer

Trying to dectect when WKWebKit start loading video, to stop animation

I conformed to "WKNavigationDelegate" and according to the document I am using these methods, but it seems like they're not getting call. I am not getting any result. func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation:…
Iam Wayne
  • 561
  • 6
  • 26
1
vote
2 answers

How to determine when UIWebView modal view is removed?

I have a UITableView that when a cell is pressed a loading view is shown while a UIWebView loads its content (mp3 file). When the UIWebView starts to load, it pushes up its modal view. That part works fine--the loading view is shown until the…
1
vote
0 answers

JSContext can not evaluateScript such as "alert()"

My Code is quite simple as below: @interface ViewController () { UIWebView *_webView; SContext *_jsContext; } @end @implementation ViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self…
WATER1350
  • 141
  • 1
  • 1
  • 6
1
vote
2 answers

Use UIWebView in console

I want to use UIWebView in the console, so I define a delegate: @interface webViewDelegate : NSObject and write the protocol: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request…
vane
  • 99
  • 6
1
vote
1 answer

Swift UIWebView Delegate use and override shouldStartLoadWith

I am writing a reusable UIWebView controller and want to descend from that while using the delegate shouldStartLoadWith function and override it as well but I'm not sure how to do it. In my reusable UiWebView controller I have this. func webView(_…
markhorrocks
  • 1,199
  • 19
  • 82
  • 151
1
vote
0 answers

How to change UIWebView's User-Agent, dynamically on the url being request?

I understand I can set the user-agent via NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" : "ABC"]) However, is it possible to set the user agent, only when I am browsing a particular url, e.g. http://www.example.com, for other…
Ryan
  • 10,041
  • 27
  • 91
  • 156
1
vote
0 answers

How to specify exactly the last time webViewDidFinishLoad for UIWebView get called?

I've read the previous post for this question, UIWebView - How to identify the “last” webViewDidFinishLoad message? but in fact I didn't get the answer very much. what I need is to execute a script on the webView but after it finishes its loading…
Mousa
  • 2,926
  • 1
  • 27
  • 35
1
vote
0 answers

UIWebView can't open link

I have word document (.docx) with hyperlink, which points to my own app with specified app URL -> myApp://url. There is problem with webViewShouldStartLoadingWithRequest:navigationType: delegate event, when I open this document in UIWebView and try…