ios - how to replace loading image from html img src on loading it from local file -


i have html code. want preload images , save in local file. transform html nsattributedstring , show string in uitextview.

nsattributedstring *htmlattributedtext =         [[nsattributedstring alloc] initwithdata:[htmltext datausingencoding:nsutf16stringencoding]                                         options:@{ nsdocumenttypedocumentattribute : nshtmltextdocumenttype }                               documentattributes:nil                                            error:&err];  textview.attributedtext = htmlattributedtext; 

how load images local file instead of loading internet?

if understand right, me simplest , fastest way use sdwebimage

after once downloaded image, lib save , next time when try download image same url lib give cached image.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -