uiwebview

sourcing local javascript in uiwebview ios

大城市里の小女人 提交于 2019-12-21 08:53:31
问题 ------------------NOTICE---------------- Sorry guys, made a stupid mistake, I had found this fix already: https://devforums.apple.com/message/32282 Which works, but didn't realise that the target location had changed in the newer versions of Xcode, so instead clicked on the project file at the top of the list on the left, and found my way to Copy Bundle Resources that way. Not sure why everything but the js shows up there by default, but dragging the files there from the list on the left

Is there a way to refresh your phonegap application - eg, build the page and start running the scripts from the beginning?

跟風遠走 提交于 2019-12-21 07:15:28
问题 Is there any way to do this? E.g., if a user starts the app with no internet connection, no remote scripts can be loaded, and the application basically can't run and I display a "No internet" page. But if the user gets internet later and the application is still running, is there any way to just "restart" ? 回答1: how about - document.location = "index.html" PhoneGap applications are just like an embedded website - you should be able to go to any hyperlink you wish (mind the whitelists). Of

UIWebView, enable touch hold save image, like in mobile Safari

柔情痞子 提交于 2019-12-21 06:36:26
问题 I'd like to enable Save Image and Copy when a user touch-holds an image in a UIWebView in my app. Is there a property that will enable this or will I need to write some special methods to accomplish this? Thanks for reading! 回答1: UIImage * downloadImage = [[UIImage alloc] initWithContentsOfFile:path]; UIImageWriteToSavedPhotosAlbum(downloadImage,nil, nil, nil); [downloadImage release]; UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Saved" message:@"Wallpaper saved to your Gallery.

Progress bar (and network activity status) for UIWebView

余生颓废 提交于 2019-12-21 06:26:00
问题 After a long break I've started doing ios development again. With that in mind I downloaded the latest version of XCode (5.02) and set about coding an app with ios7 as the target. Everything was going fine until I added a "webView page" to my app. I was naively expecting UIWebView to work just like a page in Safari, but it doesn't. The most obvious thing missing is that there's absolutely no feedback to the user while the page is loading. i.e. the network activity indicator doesn't appear at

Progress bar (and network activity status) for UIWebView

走远了吗. 提交于 2019-12-21 06:25:30
问题 After a long break I've started doing ios development again. With that in mind I downloaded the latest version of XCode (5.02) and set about coding an app with ios7 as the target. Everything was going fine until I added a "webView page" to my app. I was naively expecting UIWebView to work just like a page in Safari, but it doesn't. The most obvious thing missing is that there's absolutely no feedback to the user while the page is loading. i.e. the network activity indicator doesn't appear at

UIWebView - capturing clicks

廉价感情. 提交于 2019-12-21 06:17:26
问题 Is there a way to capture clicks on links within a UIWebView. I want to find out the address that the user has clicked, but not actually go to the page. Is this possible? 回答1: Yes there is a delegate method you're view controller can implement: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType reference: http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIWebViewDelegate_Protocol

Remove selection gray shadow from html input on iOS

吃可爱长大的小学妹 提交于 2019-12-21 05:50:34
问题 I'm currently working on html rich text editor for my iOS application,so,the setup is simple,i have a UIWebView loading my editor code,the html input is a 'contentEditable' DIV . The problem is that every time i select this div to enter some text,a light gray frame appears on the input frame,telling the user that the textfield has been selected. NOTE :You can see the effect in this quick video My question is: How to remove this light gray frame? My html file is bellow: <html> <head> <style

Sensitive Data stored in cache.db-wal file?

左心房为你撑大大i 提交于 2019-12-21 05:10:06
问题 I am facing an issue in an iOS application that uses a UIWebView to render HTML5 code that is part of the application bundle. This HTML5 code makes ajax requests to our backend which may potentially have sensitive data in them. This is all done over HTTPS and our application never stores the sensitive data. However, when doing security testing for the application, we found that http post requests where being stored in a local SQL Lite database (cache.db) as of iOS 5. It was easy to manage

Call a method by clicking a button in a UIWebView

给你一囗甜甜゛ 提交于 2019-12-21 05:04:32
问题 I want to generate some HTML content and put this into a UIWebView. The HTML contains some buttons. Is it possible to define actions for these buttons? I want to call a method (e.g. firstButtonPressed) in my objective-c code when someone presses this button in the UIWebView. Thanks you for helping me. 回答1: Just to follow up on this, it is possible, and not to difficult to connect HTML/javascript events to objective-c methods. Damien Berrigaud came up with a good example of how to do that by

iOS 8 UIWebView memory management

混江龙づ霸主 提交于 2019-12-21 04:46:08
问题 I have a hierarchical application (NavigationController) with a simple table view in a role of the root controller. Each time you select any cell, you have got a new View with some information about the details (managed by DetailViewController). On the side of DetailViewController's view I have a UIWebView to display data from Internet. But the problem happens when I look at memory usage. Each new opened view of DetailViewController with its content loaded from the web via UiWebView brings