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
4
votes
5 answers

Manage the UIWebView loading process

I use UIWebView to present data, and a spinner to show the loading process. The data is an .mp3 file from my server. I start the spinner when I start loading the webView. Then there is a delay until the audio file starts playing. I need to Stop the…
John Smith
  • 2,012
  • 1
  • 21
  • 33
4
votes
1 answer

UIWebView resource loading with Basic Authentication

For a (web)application I am creating, I need to use Basic Authentication to load pages in my UIWebView. Now to set the authorization header I use: NSString *result = [NSString stringWithFormat:@"%@:%@", username, password]; NSData *resultData =…
Thizzer
  • 16,153
  • 28
  • 98
  • 139
3
votes
2 answers

Is didFailLoadWithError normally called after I return NO in the delegate function shouldStartLoadWithRequest?

I am seeing this behavior not documented in Apple's UIWebViewDelegate: If I return NO to the delegate function - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request…
futureelite7
  • 11,462
  • 10
  • 53
  • 87
3
votes
2 answers

Javascript to Obj-c request.. returning value back to Javascript

My app has a UIWebView component that calls Obj-c functions using 'webView:shouldStartLoadWithRequest:navigationType:' I parse the request here then call the required Obj-c code. What I would like to do next is return a value back to the Webview..…
jim
  • 8,670
  • 15
  • 78
  • 149
3
votes
0 answers

Datetime Picker not Showing in UIWebView

My website is embedded in an iOS App using UIWebView, but devices running (since the update) iOS 14 are not showing the datetime picker, contrary to Safari App for iOS 14. Any idea of why this is not working anymore? Thanks in advance. iOS 14 app…
James
  • 679
  • 1
  • 8
  • 22
3
votes
3 answers

Recognising UIWebView file types

I wish to detect when a PDF has been clicked and display it in a separate UIWebView. Here's what I have currently: - (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request…
Dan Hanly
  • 7,829
  • 13
  • 73
  • 134
3
votes
1 answer

UIWebView accessing photo library but with multiple selection

I need help with this web wrapper app. In my app there is one UIWebView and it was working perfectly when I call input tag from UIWebView to access file and I haven't added any multiple in my code but still, the app is selecting multiple images but…
Vix Hunk
  • 303
  • 4
  • 17
3
votes
0 answers

Force JQuery Mobile page inside UIWebView to call webViewDidStartLoad

In my iPhone app I've got the following hierarchy: UITabBarController -> UINavigationController -> UIViewController -> UIWebView (jQuery Mobile-page) In the UIViewControllers navigationItem, I've added a button whose…
Manne W
  • 1,459
  • 4
  • 17
  • 31
3
votes
2 answers

Disable UIWebView for opening links to redirect to apps installed on my iPhone

When I browse some link in my app(in UIWebView), it opens the that link's app installed in my device. How can I restrict it to open external app and load the same URL in my UIWebView.
RBN
  • 482
  • 4
  • 13
3
votes
1 answer

shouldStartLoadWithRequest not loading links when clicked on in UIWebView

I've started using shouldStartLoadWithRequest and been encountering puzzling behaviour as I understand things. In it's most simplest form I've tried the following... - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest…
Rob Segal
  • 7,515
  • 12
  • 43
  • 72
3
votes
2 answers

Capture clicked links in a UIWebView using RxSwift

I'm starting to use RxSwift at work and I'm on a project right now where I need to capture clicked links in a web view. But I can’t get this method : webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType:…
Nicolas
  • 31
  • 3
3
votes
0 answers

UIWebViewDelegate cordova

I have a cordova-base app (ios), where I have added some native code. When cordova had not support to WKWebView I had the web view delegate methods in my viewcontroller and I had control on it, now with the WKWebView plugin i'm not able to set my…
Pol
  • 948
  • 1
  • 8
  • 19
3
votes
2 answers

UIWebView stopped getting JS events in shouldStartLoadWith under Swift3

I'm using UIWebView in my application for some reasons that WKWebView can't fit for me. Explaining that, I just finished with my application conversion to Swift3 (Was 2.2) and my shouldStartLoadWith functions not getting the JS event. If i run my…
Amir Foghel
  • 853
  • 1
  • 12
  • 28
3
votes
2 answers

Nativescript webview on navigate

Is there a "navigate" event on webview in nativescript? I've done it in Xamarin (c#) with Browser.Navigating += Myfunction Is there any event like this in nativescript? I would like to make it so that if i click on a link outside my scope of the…
3
votes
4 answers

iPhone - UIWebView: Detect User Scrolling to Bottom of Page

So, I have a UIView with a UIWebView inside serving up a local HTML file (a document preview). I also have "Accept" & "Reject" UIButtons. I need these buttons to only appear after the user has scrolled to the bottom of the web page. Is there a…
JWD
  • 12,188
  • 3
  • 34
  • 32