All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Brad Parks's user avatar
  • 68.9k
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 ...
madcoderz's user avatar
  • 4,433
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 ...
Jasarien's user avatar
  • 58.4k
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 *)...
TechZen's user avatar
  • 64.4k
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 ...
bpapa's user avatar
  • 21.5k
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 ...
VansFannel's user avatar
  • 45.4k
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 ...
Fuzzy Purple Monkey's user avatar
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 ...
Knodel's user avatar
  • 4,369
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 ...
Ortwin Gentz's user avatar
  • 53.4k
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 ...
danielreiser's user avatar
  • 5,320
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. ...
Vaibhav Saran's user avatar
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 ...
user avatar
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'...
frankodwyer's user avatar
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, ...
theory's user avatar
  • 9,462
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 ...
JJ Rohrer's user avatar
  • 2,701
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 ...
user avatar
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 ...
Abs's user avatar
  • 56.9k
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. ...
Ben Scheirman's user avatar
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: ...
Stretch's user avatar
  • 3,719
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 ...
CM Subram's user avatar
  • 473
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 ...
rpheath's user avatar
  • 1,057
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 ...
Mustafa's user avatar
  • 20.6k
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 ...
Obliviux's user avatar
  • 2,669
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 ...
tbacos's user avatar
  • 733
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.
How2iphone's user avatar
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;
Bala's user avatar
  • 1,305
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?
Ploetzeneder's user avatar
  • 1,281
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 ...
sniurkst's user avatar
  • 7,282
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 ...
tacos_tacos_tacos's user avatar
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 ...
Biranchi's user avatar
  • 16.2k
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 ...
cannyboy's user avatar
  • 24.3k
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?
dl.'s user avatar
  • 2,284
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 ...
Steve Wang's user avatar
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, ...
byron's user avatar
  • 984
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 ...
B K's user avatar
  • 1,564
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 ...
PgmFreek's user avatar
  • 6,402
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? ...
user avatar
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 (...
Sebastian's user avatar
  • 905
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 ...
frankodwyer's user avatar
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 ...
cbrauchli's user avatar
  • 1,555
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:...
Yuvaraj.M's user avatar
  • 9,781
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 ...
Ricky's user avatar
  • 639
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 ...
HARDWARRIOR's user avatar
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 ...
Dougnukem's user avatar
  • 14.8k
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. ...
Dmytro's user avatar
  • 2,532
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: ...
Aaron's user avatar
  • 868
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. ...
Oliver's user avatar
  • 23.3k
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 ...
Mina Mikhael's user avatar
  • 2,825
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. ...
Mohan Gulati's user avatar
  • 28.2k
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
Mike Rychev's user avatar

1
2 3 4 5
63