开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜