I have HTML code. I want to preload images from it and save in local file. I transform HTML to NSAttributedString and show that string in UITextView.
NSAttributedString *htmlAttributedText =
[[NSAttributedString alloc] initWithData:[htmlText dataUsingEncoding:NSUTF16StringEncoding]
options:@{ NSDocumentTypeDocumentAttribute : NSHTMLTextDocumentType }
documentAttributes:nil
error:&err];
textView.attributedText = htmlAttributedText;
How to load images from local file instead of loading from internet?