PDA

View Full Version : Saving images from a UIWebView?




Noisemaker
Nov 14, 2009, 10:10 PM
I'm working on a web-based app that makes use of some UIWebViews. One feature I want to add to the app is image saving. Basically, like what you can do in Safari. If you hold down on the image for ~3 seconds, it pulls up a pop-up prompt that asks if you want to save the image, or cancel.

Is this possible to add to a normal UIWebView? If so, how do I do it?



MacDonaldsd
Nov 15, 2009, 12:50 PM
I'm working on a web-based app that makes use of some UIWebViews. One feature I want to add to the app is image saving. Basically, like what you can do in Safari. If you hold down on the image for ~3 seconds, it pulls up a pop-up prompt that asks if you want to save the image, or cancel.

Is this possible to add to a normal UIWebView? If so, how do I do it?

Looking at the APIs, it looks like your can't. Would love to be proved wrong though.

Noisemaker
Nov 15, 2009, 01:35 PM
Damn. That's...irritating. My app is entirely done aside from this small issue. And, for what the app does, saving images is a major part of it.

If anyone knows of an alternate way to handle image saving in a UIWebView, please chime in!

North Bronson
Nov 15, 2009, 03:49 PM
Damn. That's...irritating. My app is entirely done aside from this small issue. And, for what the app does, saving images is a major part of it.

If anyone knows of an alternate way to handle image saving in a UIWebView, please chime in!

It might not be something to change for the UIWebView, but maybe something to change for the HTML code itself.

You might have to find something like: "-webkit-touch-saveimage: true". I just made that code up, but it might be out there. Try looking through the webkit documentation.