Reload images in a UIWebView after they have been downloaded by a background thread
<p>I have an application that frequently checks in with a server and downloads a batch of articles to the iphone. The articles are in html and just stored using core data. 
An article has 0-n images on the page.</p>

<p>Downloading all associated images at the same time as the text will be too slow and take too much bandwidth. Users are not likely to open every article. If they open an article once it is likely they will open it several times.</p>

<p>So I want to download and store the images locally when they are needed.</p>

<p>These articles are listed in a UITableView. When you tap an article you pop open a UIWebView that displays the article.</p>

<p>I have a function that checks if I have downloaded the images associated with the article already. If I have I just pop open the the UIWebView - everything works fine.</p>

<p>If I don't have the images downloaded I go off and download them and store them to my Documents directory. Although this i working, the app is hanging while the images are downloading. Not very tidy.</p>

<p>I want the article to open in a snap and download the images with the article open.</p>

<p>So what I've done is I check if the images are downloaded, if they aren't I go ahead and just "touch" the files I need and load the webview. The UIWebView opens up but the images referenced contain no data. Then in a background thread I download the images and overwrite the "dummy" ones.</p>

<p>This will save the images and everything but it won't reload the images in my current UIWebView. I have to go back out of the article back back in again to see the images. </p>

<p>Are there any ways around this? reloading just an image in a UIWebView?  </p>
