All Questions
3,136
questions
229
votes
22
answers
140k
views
Stop UIWebView from "bouncing" vertically?
Does anyone know how to stop a UIWebView from bouncing vertically? I mean when a user touches their iphone screen, drags their finger downwards, and the webview shows a blank spot above the web page I ...
170
votes
18
answers
201k
views
How to load local html file into UIWebView
I'm trying to load a html file into my UIWebView but it won't work. Here's the stage: I have a folder called html_files in my project. Then I created a webView in interface builder and assigned an ...
166
votes
13
answers
121k
views
Using HTML and Local Images Within UIWebView
I have a UIWebView in my app which I want to use to display an image which will link to another url.
I'm using
<img src="image.jpg" /> to load the image.
The problem is that the image doesn't ...
146
votes
7
answers
42k
views
How to Get the Title of a HTML Page Displayed in UIWebView?
I need to extract the contents of the title tag from an HTML page displayed in a UIWebView. What is the most robust means of doing so?
I know I can do:
- (void)webViewDidFinishLoad:(UIWebView *)...
142
votes
8
answers
102k
views
What are some methods to debug Javascript inside of a UIWebView?
I'm trying to figure out why something with Javascript isn't working inside of a UIWebView. To my knowledge, there is no way to set a breakpoint inside of XCode for a js file. No problemo, I'll just ...
140
votes
8
answers
74k
views
UIWebView background is set to Clear Color, but it is not transparent
I'm developing an iOS 4 application using iOS SDK latest version and XCode 4.2.
I have a XIB with a UIWebView with Alpha = 1.0, Background set to Clear Color and Opaque is not set. On this XIB I ...
134
votes
10
answers
153k
views
Reading HTML content from a UIWebView
Is it possible to read the raw HTML content of a web page that has been loaded into a UIWebView?
If not, is there another way to pull raw HTML content from a web page in the iPhone SDK (such as an ...
119
votes
8
answers
59k
views
How to make a transparent UIWebView
I have an app with a UITableView and a corresponding detail view for each row. In the detail view I have to display some text and a background image (text is different for each row, but the image ...
116
votes
15
answers
131k
views
How to determine the content size of a UIWebView?
I have a UIWebView with different (single page) content. I'd like to find out the CGSize of the content to resize my parent views appropriately. The obvious -sizeThatFits: unfortunately just returns ...
113
votes
14
answers
101k
views
Get current URL of UIWebView
I already tried getting the current URL of my UIWebView with: webview.request.URL.
Unfortunately the NSURL was empty. Anything wrong here? I am working with Xcode 3.2.2 beta 5.
The code above should ...
91
votes
5
answers
50k
views
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. ...
72
votes
14
answers
112k
views
Change User Agent in UIWebView
I have a business need to be able to customize the UserAgent for an embedded UIWebView. (For instance, I'd like the server to respond differently if, say, a user is using one version of the app ...
71
votes
7
answers
66k
views
How to determine UIWebView height based on content, within a variable height UITableView?
I am trying to create a UITableView with variable height rows as explained in the answer to this question
My problem is each cell contains a UIWebView with different (statically loaded) content I can'...
62
votes
3
answers
71k
views
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, ...
61
votes
9
answers
65k
views
iPhone UIWebview: How to force a numeric keyboard? Is it possible?
I'm experimenting with PhoneGap to develop some iPhone apps. PhoneGap basically wraps a UIWebView - it works well. The problem is the my app has several input fields that only take numeric input. I ...
57
votes
5
answers
43k
views
Loading a webpage through UIWebView with POST parameters
Is it possible to load a page through UIWebView with POST parameters?
I can probably just load an embedded form with the parameters and fill them in with javascript and force a submit, but is there a ...
55
votes
8
answers
81k
views
HTML Content fit in UIWebview without zooming out
I am making use of the UIWebView to render some HTML. However, although the width of my webview is 320 my HTML is still shown full width and can be scrolled horizontally.
I want to achieve the same ...
54
votes
9
answers
40k
views
UIWebView didFinishLoading fires multiple times
I have some code that needs to run after the a UIWebView finishes loading a document. For that I've set the UIWebView's delegate to my controller, and implemented the webViewDidFinishLoading method.
...
51
votes
9
answers
68k
views
UIWebView to view self signed websites (No private api, not NSURLConnection) - is it possible?
There's a load of questions which ask this: Can I get UIWebView to view a self signed HTTPS website?
And the answers always involve either:
Use the private api call for NSURLRequest: ...
47
votes
5
answers
42k
views
iOS WebView remote html with local image files
Similar questions have been asked before, but I could never find a solution.
Here is my situation - my UIWebView loads a remote html page. The images used in the web pages are known at build time. In ...
47
votes
8
answers
43k
views
How to show HTML text from API on the iPhone?
The best example to explain my situation is to use a blog post. Let's say I have a UITableView loaded with title's of blog posts that I got from an API. When I click on a row I want to show the ...
46
votes
9
answers
61k
views
iPhone Development - Setting UIWebView font
I have to show rich text that i pull from server, so i'm using UIWebView. Now the problem is that i have no control over the font which is used in UIWebView. How can i change the font to use system ...
42
votes
8
answers
49k
views
How to call Objective-C from Javascript?
I have a WebView, and I want to call a view in Objective-C from JavaScript. Does someone know how I can do this?
I have this code in my ViewController:
- (BOOL)webView:(UIWebView *)webView2
...
42
votes
5
answers
30k
views
Force a WebView link to launch Safari?
I have a UIWebView embedded within an iPhone app of mine. I want to be able to have certain links within that webview open into the full Mobile Safari app (i.e. not my embedded version of it).
Is ...
40
votes
7
answers
19k
views
differences between uiwebview and mobile safari [closed]
Have looked far and wide for info and have found no definitive list. Please add your observations. I'm sure it will come in handy to all.
39
votes
11
answers
44k
views
how to increase font size in UIWebView
how to increase or decrease the UIWebview font size, not using scalePageToFit:NO;
39
votes
4
answers
39k
views
UIWebView finished loading Event
Is it possible to start an event when an UIWebView (Iphone) has finished loading the URL.
How can I find out, the current URL of the UIWebView?
38
votes
6
answers
14k
views
UIWebView resizes text after rotating: looking for explanation for magical bug or my stupidity
so I have UIWebView in my application and I load some html (article) to it, put some CSS to make everything nicer. That's simple and clear and everything is perfect until I try to add reading in ...
38
votes
3
answers
20k
views
tableView:indexPathForCell returns nil
I am using the method tableView:indexPathForCell to implement a custom delegate that can dynamically resize a UITableViewCell based on the frame size of the UIWebView that is inside of it. The problem ...
37
votes
10
answers
54k
views
Handling touches inside UIWebview
I have created a subclass of UIWebView , and have implemented the
touchesBegan, touchesMoved and touchesEnded methods.
but the webview subclass is not handling the touch events.
Is there any method ...
36
votes
8
answers
14k
views
Remove gradient background from UIWebView?
How do remove the gradient from a UIWebView - the one that you see if you overscroll the top or bottom.
This code
webView.backgroundColor = [UIColor whiteColor];
just changes the color of the ...
35
votes
3
answers
47k
views
Does UIWebView send the same User-Agent in the Request Headers as mobile Safari?
Sorry, I would just test this myself, but I'm currently without my mac. Does a web request made inside of a UIWebView send the same user-agent info that a web request made from mobile Safari would?
35
votes
1
answer
2k
views
iOS 9 UIWebview embedded video fullscreen play cause a constraint error
Just updated to Xcode 7 and iOS 9 SDK and found a problem when playing the HTML 5 video in the UIWebview. The code is very simple, just load an HTML code in the UIWebview and play it. The HTML code ...
34
votes
1
answer
15k
views
Is it possible for a UIWebView to save and autofill previously entered form values (e.g., username & password)?
I'm building an iPhone app that is just a UIWebView of an existing mobile site that has a form-based login. When I login to the mobile site on iPhone Safari, I'm prompted to save my username/password, ...
32
votes
3
answers
42k
views
how to intercept Button click inside UIWebview on IOS?
I have a HTML form that has certain fields which i am opening inside a UIWebview. On click of a particular button i want to do a in app action.
The approach i'm using now is on click of the button i ...
31
votes
3
answers
33k
views
UIWebView Link Click
In my app certain HTML page is loaded in a webview. I need to get click on certain label like "neuron" and should display their description in another view. How Can i get the label click and clicked ...
31
votes
15
answers
21k
views
Remove UIWebView Shadow?
Does anyone know if its possible to remove the shadow that is placed on the UIWebView window?
Example: http://uploadingit.com/files/1173105_olub5/shadow.png
If its possible how do you do it?
...
31
votes
11
answers
58k
views
UIWebView: when did a page really finish loading?
I need to know, when a web page has completely been loaded by UIWebView. I mean, really completely, when all redirects are done and dynamically loaded content is ready.
I tried injecting javascript (...
31
votes
6
answers
21k
views
How to safely shut down a loading UIWebView in viewWillDisappear?
I have a view containing a UIWebView which is loading a google map (so lots of javascript etc). The problem I have is that if the user hits the 'back' button on the nav bar before the web view has ...
31
votes
4
answers
5k
views
Why does clearing NSUserDefaults cause EXC_CRASH later when creating a UIWebView?
Before I begin, I should tell you that this only happens in iOS 5.1. Before the most recent update, this had never happened and it still does not happen on any other version. That said, here's what's ...
31
votes
5
answers
35k
views
Play YouTube videos in iPhone app without using UIWebView?
I want to play YouTube videos from my iPhone app. I have to tried play YouTube videos in my iPhone app with the following codes,
[self playVideo:@"http://www.youtube.com/watch?v=WL2l_Q1AR_Q" frame:...
30
votes
2
answers
18k
views
Using UIDocumentInteractionController to display presentPreviewAnimated: via UIWebView
I'd like to intercept the clicks from any of the supported file types of the UIDocumentInteractionController and display them in a modal view (provided by presentPreviewAnimated: method of ...
29
votes
6
answers
24k
views
UIWebView EXC_BAD_ACCESS crash
I'm experiencing crashes of an app that uses UIWebView. Usually it's when page is not fully loaded and UIWebView is sent stopLoading selector. Or when UIWebView fully loaded page. I've got ...
29
votes
5
answers
42k
views
iPhone UIWebView local resources using Javascript and handling onorientationChange
I'm trying to server HTML Javascript and CSS content from an iPhone application's local resources, and I'm having trouble handling onOrientationChange events and including external Javascript.
I seem ...
29
votes
2
answers
24k
views
How to get UIWebView User-Agent
I've got a problem working with one remote server. My app makes a request to a server using [NSData initWithContentsOfURL:] method and as a response I get website's url which I open in UIWebView.
...
29
votes
5
answers
15k
views
EXC_BAD_ACCESS in UIWebView
I just downloaded the crash reports for one of my iPhone apps from iTunes Connect. The most common crash has a trace like the following:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: ...
29
votes
7
answers
73k
views
iPhone - Auto resizing UIWebView content do not fit the frame
I'm generating an UIWebView into my viewDidLoad method, with a tiny size (let's say something like 50x70). And then I put it into a super UIView.
I'd like to make its content fit the webView frame. ...
29
votes
7
answers
21k
views
iPhone UIWebView slow loading to local HTML files
I'm developing an app that requires caching web pages (completely) along with their CSS files and images after saving the entire HTML of the page (going through the links to store each file along with ...
28
votes
3
answers
37k
views
How to insert HTML into a UIWebView
I have HTML Content which was being displayed in a UITextView. The next iteration of my app is display the HTML contents into a UIWebView. So, I basically replaced my UITextView with UIWebView. ...
27
votes
9
answers
61k
views
How to clear UIWebView cache?
I need UIWebView to display some local .webarchive file. But images there have same names, so UIWebView shows only one image all the time. How can I clear the cache?
Thanks in advance