uiwebview

Loading remote html in PhoneGap or Cleaver (Cordova) on iOS

一笑奈何 提交于 2019-12-02 18:53:39
I am using an Cordova 2.4 component Cleaver and an embedded view in my native iOS 6 application. So far I have managed to create the project structure, link the Cordova libraries and set up the Hello World app that does work providing "Device Ready" feedback. This is all great but it loads all html from the www repository distributed inside the app itself (including all js libraries). What I really want yo do is this: 1 - popup the cleaver component (which is nothing else than an embedded uiwebview) in my app. Easy - done. 2 - load some html content from a URL pointing to a servlet on my

Scrolling over highcharts graph

北城余情 提交于 2019-12-02 18:28:11
Here's my issue: I am using the phonegap framework to develop a hybrid app, and I need this application to have graphs for which I had decided to use the highcharts library. The problem is that I can't seem to be able to scroll after touching on the chart (at least while touching inside the selected portion of the image). What I want to do is prevent the chart from taking any events and show a plain graph with anything being highlighted and be able to scroll even if im doing it over the graph. Code: chart1 = new Highcharts.Chart({ chart: { renderTo: 'containerBar', animation: false, type: 'bar

How to improve UIWebView scrolling performance?

若如初见. 提交于 2019-12-02 18:17:32
It seems to be really hard to improve the performance of a UIWebView, especially for websites like Mashable or Ars Technica, where tons of scripts are loaded and long, multi-page articles are common. I'm aware of 3 similar questions, but they both have no working solution: UIWebView scrolls jerkily - private API calls like -(void)_setDrawInWebThread:(BOOL)arg1 and -(void)_setDrawsCheckededPattern:(BOOL)arg1 are suggested, and we know that they aren't allowed in App Store apps How to get fast, smooth scrolling with UIWebView? - someone talked about CATiledLayer, but there was no clear pointer

How to get all <img src> of a web page in iOS UIWebView?

纵然是瞬间 提交于 2019-12-02 18:17:00
everyone. I'm trying to get all image urls of the current page in UIWebView. So, here is my code. - (void)webViewDidFinishLoad:(UIWebView*)webView { NSString *firstImageUrl = [self.webView stringByEvaluatingJavaScriptFromString:@"var images = document.getElementsByTagName('img');images[0].src.toString();"]; NSString *imageUrls = [self.webView stringByEvaluatingJavaScriptFromString:@"var images= document.getElementsByTagName('img');var imageUrls = "";for(var i = 0; i < images.length; i++){var image = images[i];imageUrls += image.src;imageUrls += \\’,\\’;}imageUrls.toString();"]; NSLog(@

objective c open links from UIWebView in safari

跟風遠走 提交于 2019-12-02 18:08:13
问题 I have a UIViewController subclass which includes a UIWebView and implements the UIWebViewDelegate. What i want to do is make links pressed in the UIWebView to open in safari. I've read past questions about this, but still can't make it work. Here is about what i've done: In the - (void)viewDidLoad method of my class i use the following code: [[self articleWebView] setDelegate: self]; [articleWebView loadRequest:requestObj]; I don't want to display the whole html page that is loaded in the

Load YouTube outside Application

倾然丶 夕夏残阳落幕 提交于 2019-12-02 17:55:57
问题 I have a simple UIWebView showing a page including YouTube thumbnail. When I click it, it loads it inside the application, but I want it to be loaded outside application in the YouTube-app. How can this be done? Thanks. 回答1: It should be as simple as loading the YouTube-video-url like this: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=abcde12345"]]; It won't work in the simulator because it doesn't have the YouTube-app, but it will work on

UIWebView Delegate Methods not Working [closed]

99封情书 提交于 2019-12-02 17:53:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . **When I Use self.myWeview.delegate = self , UIWebView can not load URL in UIWebView ... But If I set it to self.myWeview.delegate = nil , then methods(delegate) can't load but URL is load this is the code:--- { self.myWeview.delegate = nil; NSURL *url = [NSURL URLWithString:@"http://www.google.com"];

Client certificate authentication in UIWebView iOS

不想你离开。 提交于 2019-12-02 17:48:02
I'm kind of new in objective c, but I'm developing an app which has a UIWebView that loads some web content. All the web pages require client certificate for authentication and I'm struggling with it for dew days. Does anyone know the flow how to implement it in UIWebView? Thanks! To avoid any problem in the UIWebView, you have to make a reques to you website root, with the client certificate, before the request of the web view. You can use the UIWebViewDelegate method: -(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:

iPhone UIWebview — Saving an image already downloaded

柔情痞子 提交于 2019-12-02 17:47:31
I have an iPhone app with an embedded UIWebview (Safari) control. I'd like to be able to store the images from certain webpages locally. Can I programmatically access the path where UIWebview downloads images? Or do I need to parse the HTML and then go find the image resource out on the net and download it again? I do not know if you can access the preloaded images from Safari's cache... However you can easily find the image URLs without parsing HTML, by running a bit of javascript instead: NSString *script = @"var n = document.images.length; var names = [];" "for (var i = 0; i < n; i++) {" "

UIWebView JavaScript losing reference to iOS JSContext namespace (object)

允我心安 提交于 2019-12-02 17:38:25
I've been working on a proof of concept app that leverages two-way communication between Objective C (iOS 7) and JavaScript using the WebKit JavaScriptCore framework. I was finally able to get it working as expected, but have run into a situation where the UIWebView loses its reference to the iOS object that I've created via JSContext. The app is a bit complex, here are the basics: I'm running a web server on the iOS device (CocoaHTTPServer) The UIWebView initially loads a remote URL, and is later redirected back to localhost as part of the app flow (think OAuth) The HTML page that the app