Using UIWebView to load web images?
Is is possible to download images inside the UIWebView and load it into a UIImage? I would like to a开发者_运维百科llow the user to grab an email from a web site and load it into my app. I guess the manual way right now would to let the user download the image to their photo album and then I can allow the person to load it up by accessing the photo album. I'm trying to make it a bit more smooth so if anyone can shed any light on this that would be great. Thanks!
You can't save images downloaded in your UIWebView unless they are in base64 format.
Actually the only thing you can do is catching the source code of the page using javascript and then save it as a string. (that's why images should be in base64 format).
Have you taken a look at ASIWebPageRequest? If you intercepted page loading requests, ran them through that system, then loaded the results into your UIWebView you could intercept the images along the way.
精彩评论