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

How to delete all cookies of UIWebView?

In my application, I have a UIWebview that loads linkedin auth page for login. When user logs in, cookies saves into the application. My app has a logout button that is not related to linkedin login. So when user clicks on this button, he logs off…
Vaibhav Saran
  • 12,848
  • 3
  • 65
  • 75
62
votes
3 answers

How to handle app URLs in a UIWebView?

I recently found that my UIWebView was choking on ITMS links. Specifically, from the UIWebView in my app, if I navigate to a site such as this one and click the "Available on the App Store" link, UIWebView would error out with "Error…
theory
  • 9,178
  • 10
  • 59
  • 129
31
votes
5 answers

How to get HTTP headers

How do you retrieve all HTTP headers from a NSURLRequest in Objective-C?
Nagra
  • 1,529
  • 3
  • 15
  • 25
25
votes
4 answers

How to disable long touch in UIWebView?

I want to disable long-touch from the application. I have no control on the HTML that I am loading on my WebView.
Alex Terente
  • 12,006
  • 5
  • 51
  • 71
17
votes
3 answers

UIWebView: webViewDidStartLoad/webViewDidFinishLoad delegate methods not called when loading certain URLs

I have basic web browser implemented using a UIWebView. I've noticed that for some pages, none of the UIWebViewDelegate methods are called. An example page in which this happens is: http://www.youtube.com/user/google. Here are the steps to reproduce…
Dia Kharrat
  • 5,948
  • 3
  • 32
  • 43
17
votes
5 answers

How to detect when a UIWebView has completely finished loading?

I am trying to build a filter for a UIWebView and I am struggiling to detect when the UIWebView has completely finished loading. I have used the following two methods – webView:shouldStartLoadWithRequest:navigationType: – webViewDidFinishLoad: but…
ORStudios
  • 3,157
  • 9
  • 41
  • 69
16
votes
6 answers

UIWebView first request too slow

I am using UIWebView to render web content in my application. I observed that the initial request when the app launches i.e. loadRequest, takes a long time to render the contents. However the subsequent requests which I don't track of, are much…
Nitish
  • 13,845
  • 28
  • 135
  • 263
13
votes
2 answers

set a delegate for UIWebView

How do I set a delegate for my UIWebView to use webViewDidFinishLoad?
Dayzza
  • 1,561
  • 7
  • 18
  • 29
13
votes
2 answers

NSString in UIWebview

I have an NSString and a webView in my project (Objective-C for iPhone), I have called index.html in webView and inside it I inserted my script (javascript). How can I pass the NSString as a var in my script and viceversa? This is an example, but I…
pascalbros
  • 16,122
  • 5
  • 23
  • 35
12
votes
1 answer

UIWebView not go to didFailLoadWithError when webLink not found?

I use UIWebView to load web from a webLink and UIWebViewDelegate to control error state: [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:webLink]]]; - (void)webViewDidStartLoad:(UIWebView *)webView{ NSLog(@"START…
Jack
  • 232
  • 1
  • 2
  • 11
11
votes
6 answers

UIWebViewDelegate: webViewDidFinishLoad not called during in-page navigation

I have an app where users can navigate a pile of locally stored HTML files. I have a UIWebView, configured up correctly with a UIWebViewDelegate. Usually, when the user follows a link, shouldStartLoadWithRequest is called, followed by…
thomax
  • 9,213
  • 3
  • 49
  • 68
10
votes
1 answer

UIWebView stringByEvaluatingJavaScriptFromString

I'm stuck on getting some pretty basic JS to run in my UIWebView. In the web view's delegate, I have : - (void)webViewDidFinishLoad:(UIWebView *)wView { NSString *someHTML = [wView…
TomH
  • 2,950
  • 2
  • 26
  • 49
9
votes
1 answer

UIWebView content height not accurate in scrollview.contentsize

I am trying to scroll to a particular page in a pdf document I have loaded in a UIWebView. I am able to do this without a problem in iOS 5 using: pageHeight = webView.scrollView.contentSize.height / numberOfPages; [[webView scrollView]…
user888867
  • 540
  • 5
  • 16
9
votes
2 answers

shouldStartLoadWithRequest is never called

I've researched and researched and still don't understand why shouldStartLoadWithRequest is never called. My page loads fine and some of the UIWebview delegate protocol methods are called. Please find relevant snippets from my code…
user2720747
  • 101
  • 1
  • 1
  • 3
9
votes
3 answers

UIWebView doesnt load URL , iOS

I am trying to load a URL when my app starts. I dragged an UIWebView Object , on my .nib , i created a property outlet , i connected it to the webview and in my view controller i place the following code : - (void)viewDidLoad { [super…
donparalias
  • 1,834
  • 16
  • 37
  • 60
1
2 3
21 22