Reputation: 635
We are developing an iOS app.In my app I need to redirect to a weblink. For that I am using webview. Now, my requirement is to save an image in that web site. But I am unable to save an image. It is getting saved when I am redirecting it to safari browser. But my client is not accepting if it is redirecting to safari browser. So my question is , is it possible to save an image with in app webview? Thanks for your valuable suggestion in advance.
Upvotes: 1
Views: 1204
Reputation: 14857
Surely you can.I have written a category for UIWebView
to enable saving image in UIWebView
to system album.Please check this UIWebView-ImageSaver out.Just import those files into your project and call enableLongPressingToSaveImage
method in viewDidLoad
method or else.
- (void)viewDidLoad {
// ...
// Long pressing the image area,and it would be saved to system album.
[webView enableLongPressingToSaveImage];
}
Upvotes: 1