Is there a way to enable touch-hold image save in UIWebview
-
13-09-2019 - |
Question
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.
No correct solution
OTHER TIPS
One way to do it (on tap) would be to
- grab the content
- Do smart img tag finding to find all img tags
- find / replace with a link to some arbitrary place http://foo.com?REAL_IMG_SRC
- overload
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
in your delegate - intercept all links that contain foo.com
- Use the REAL_IMG_SRC to download/present save options/etc...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow