Questions tagged [uiwebview]

A class used to display web content from within an iOS application. Note that UIWebView is deprecated since iOS 8, it is recommended by Apple to use WKWebView instead.

UIWebView is used to render HTML content in iOS () applications (including accompanying CSS and JavaScript). UIWebView is effectively a miniature web browser that you can embed within your app. The user can view a web page (both local or from the Internet) in the app itself instead of launching the separate Safari app. UIWebView is available in iOS 2.0 and later.

Set the delegate property for the UIWebView to an object conforming to the UIWebViewDelegate protocol if you want to track the loading of web content from your app.

Note that UIWebView is deprecated since iOS 8, it is recommended by Apple to use WKWebView instead.

Resources:

10713 questions
4
votes
0 answers

UIWebView stringByEvaluatingJavaScriptFromString returns empty string

I know there have been couple of discussion already on this topic, but I am trying a different approach here. I am trying to first inject a variable into the Webview, then try to get the output by calling a method on that variable. Here's how it…
rishabh
  • 1,155
  • 1
  • 10
  • 17
4
votes
1 answer

Detect video is going to be played in UIWebView

I want something similar to this: https://itunes.apple.com/us/app/video-download-ibolt-downloader/id481606548?mt=8 I want to detect there is any video in web page and want to download that stream into iphone device. In console media players tells…
Naveed Rafi
  • 2,503
  • 5
  • 32
  • 40
4
votes
1 answer

UIWebView doesn't treat html properly

I am sending the following string to UIWebView: However,…
Dejell
  • 13,947
  • 40
  • 146
  • 229
4
votes
1 answer

Change User-agent in UIWebView (IOS 5)

What I have done so far:I use the code below to change User-Agent in UIWebView in the project. NSDictionary *userAgentReplacement = [[NSDictionary alloc] initWithObjectsAndKeys:userAgent, @"UserAgent",nil]; [[NSUserDefaults…
Hardy Li
  • 93
  • 1
  • 9
4
votes
0 answers

How to intercept UIWebView URL resource requests

This was really hard to figure out but I think I have figured it out successfully. This code can be useful if you are trying to build a progress indicator, for example, or do something at some point in the lifecycle of loading a page. With this…
4
votes
1 answer

UIWebView Inside UIScrollView Html Links Not Working

I have added a UIWebView along with some labels inside UIScrollView (using StoryBoards) by adding it as a subview and then setting the ScrollView height to show all the html content of WebView that is loaded in it using loadHtmlString. The links in…
Jessica
  • 1,508
  • 15
  • 25
4
votes
1 answer

Take image of an invisible portion of the UIWebView

I want to create uiimage s from portions of some uiwebview content. Assume that my webview has size of (200,200). And it has a content of (800,200) in its contentview, which is scrollable, I want to take the screenshot of the following rect…
manuyavuz
  • 176
  • 1
  • 11
4
votes
1 answer

UIWebView contentEditable image copy paste crash (EXC_BAD_ACCESS)

I am loading some html content in a UIWebView. The content looks something like this qweqwwqeqwe

This part works fine. I am using the…
SayeedHussain
  • 1,696
  • 16
  • 23
4
votes
3 answers

Change font size for web view in Iphone SDK

I have implementing feed parsing & get the content as a string. Now, I am making html file through it programetically. Load that HTML in the Web view. My web View is the subview in Table View cell. But Now i want to change the font size of web…
user1673099
  • 3,293
  • 7
  • 26
  • 57
4
votes
1 answer

Programmatically logging in to website with saved username and password

One of the functions of an app I am making involves logging the user into our Campus Portal website. For ease of use, the user may enter a username and password into the app once, and it will be saved for all future log-ins. When the user clicks a…
dgund
  • 3,459
  • 4
  • 39
  • 64
4
votes
2 answers

UIWebView resize font automatically to best fit page

Is there a way to resize font automatically in a UIWebView so it will look best on screen? Something that will try to set the font size to be in the ideal size for viewing (assuming resizing the text will just wrap the text and not corrupt the whole…
bashan
  • 3,572
  • 6
  • 41
  • 58
4
votes
3 answers

How can I prevent the scaling of a UIWebview's content after reorientation?

I'm building an iOS 5/6 app that has a UIWebView. It loads some HTML that I have embedded in my app. Now when I rotate my device, the WebView changes its size (as I want it to fill the entire width of the screen). And then it gets weird: some…
frankhermes
  • 4,720
  • 1
  • 22
  • 39
4
votes
1 answer

iOS: Detect if WIFI has been authenticated?

There are times when you connect to a Starbucks Wifi, the auth page does not automatically pop up. The auth page (the one where you press "Agree" to the Wifi terms) shows up when you start using Safari. Is there any way to detect if the auth page…
ninjaneer
  • 6,951
  • 8
  • 60
  • 104
4
votes
1 answer

How to simulate tap event on UIWebView?

How to simulate tap event on UIWebView? I just need to process mouse down+up events by page scripts.
Dmitry
  • 14,306
  • 23
  • 105
  • 189
4
votes
2 answers

UIWebView - Load a local .html file with linked resources

I don't know how many forums I have already read, but I really don't know why it doesn't work! I have an iPhone Application and I would like to show a Epub book to my user. The user can read it online, otherwise he can download it into the…
iach
  • 247
  • 4
  • 19
1 2 3
99
100