How to insert image in xml on iphone
In my app i insert images in the tableview by putting the url of image in the field image of xml!! It's possible insert the entire image directly in XML, including in the field im开发者_JAVA技巧age, instead of the URL, a kind of image compression, for example, the bits that make up the image.
This will increase the loading time a lot!
Search for a solution for "lazy loading" on the Web.
This is the most common approach for loading images in the table views on iPhone...
EDIT:
If you still want to use blub (image data as text inside the XML) then you might use the next code sample:
NSData *imageData = [NSData dataWithBase64EncodedString:imageString];
UIImage *image = [UIImage imageWithData:imageData];
精彩评论