views:

830

answers:

1

Ok so in mobile safari you can pull up a web page and touch and hold on an image to save it to the iPhone's photo library. In a UIWebview on a view this does not happen (it pops up the alt-text and never prompts you). I'm wondering if anyone knows a way to turn this feature on.

+1  A: 

One way to do it (on tap) would be to

  1. grab the content
  2. Do smart img tag finding to find all img tags
  3. find / replace with a link to some arbitrary place http://foo.com?REAL_IMG_SRC
  4. overload - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType in your delegate
  5. intercept all links that contain foo.com
  6. Use the REAL_IMG_SRC to download/present save options/etc...
coneybeare