问题描述:

I want to put an image preview on my table cells which derives from the RSS item that they load when pushed to.

I'm not sure what UIImage method to use for cell.imageView.image....

Right now it's got...

 imageWithContentsOfFile

, which doesn't crash, but also doesn't display anything because....

I also want to know how best to derive the image data from the block of html, being that I'm using an open source parser (should I try to nab it in there, or create my own class for deriving it from the description string that the parser created?

I much prefer to try to create my own solutions rather than fill my project with a hundred open source library files.

Thank you for your thoughts...

网友答案:
UIImage* myImage = [UIImage imageWithData: 
[NSData dataWithContentsOfURL: [NSURL URLWithString: @"http://example.com/image.jpg"]];
cell.imageView.image = myImage;
相关阅读:
Top