简体   繁体   English

从XML for iPhone App动态提取图像

[英]Dynamically pulling images from XML for iPhone App

I've got my iPhone app pulling down live data content via XML nicely, and I've formatted the UITableView cells to display the content without too many headaches. 我的iPhone应用程序很好地通过XML提取了实时数据内容,并且我格式化了UITableView单元格以显示内容而没有太多麻烦。

However, at the moment, for each cell I'm just showing a default graphic for now, but I want this to be pulled down from my server too. 但是,此刻,现在我只为每个单元显示一个默认图形,但我也希望将其从服务器中拉下来。

The code snippet that grabs the image (which is actually in my project) is: 抓取图像的代码片段(实际上在我的项目中)是:

cell.imageView.image = [UIImage imageNamed:@"TBC.png"];

But that will need to be the dynamic image. 但这将是动态图像。

In my XML, am I better just returning 'mypic.png' and let the SDK determine the full path, like http://myapp.com/mypic.png or storing the full URL to the image in the XML? 在我的XML中,我最好只返回“ mypic.png”并让SDK确定完整路径,例如http://myapp.com/mypic.png还是将完整的URL存储到XML中?

如果应用程序将图像存储在本地,而XML只是告诉应用程序要使用什么图像,则仅使用文件名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM