在iPhone应用程序中显示RSS源中的内容 [英] Displaying content from an RSS feed in an iphone app

查看:59
本文介绍了在iPhone应用程序中显示RSS源中的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过一些有关该主题的教程,但是它们全都花了一半,然后才使人感到疑惑.

I have seen some tutorials on the subject, but they all go half into it and then leave a person wondering.

如何将RSS供稿流式传输到iPhone应用程序中.

How can I stream an rss feed into an iphone app.

我知道应该读取,解析xml等.

I know the xml should be read in, parsed etc.

但是我不确定如何显示所需的信息,例如图像,嵌入式视频等.

But then I am not sure how to display the information I need like, images, embedded videos etc.

如果有人能指出正确的方向,我将非常感激.

If someone could just point me in the right direction I would be extremely grateful.

预先感谢

推荐答案

首先,您需要某种类型的XML解析器.您可以使用内置的 NSXMLParser 或您需要下载的许多其他解析器.每个人都有自己的优点/缺点,这取决于您将使用RSS feed进行哪种类型的读取/书写.

First, you need some type of XML parser. You can use the built in NSXMLParser or a slew of other parsers that you will need to download. Each have their pros/cons depending on what type of reading/writing you will be doing with your RSS feed.

要显示数据,我建议使用tableView.您可以为每个单元格创建自定义UITablvewCells来保存数据,但是要显示它.如果您想使用Google,可以使用一些教程.

To display the data, I would recommend a tableView. You can create custom UITablvewCells for each cell to hold the data however you want to display it. There are several tutorials available for that if you want to Google for it.

对于数据,将所有RSS数据读取到您创建的数组中,并让tableView访问该数组.

As for data, read all the RSS data into an array you create and have the tableView access that array.

同样,已经有很多在线教程供您参考,但是您似乎需要在显示数据方面的帮助.通过Google快速查找如何创建自定义UITableViewCells,可以为您提供许多有用的链接.祝你好运.

Again, there are many online tutorials for this already but it seems like you need help with displaying the data. A quick Google lookup for how to create custom UITableViewCells should provide you lots of helpful links. Good luck.

这篇关于在iPhone应用程序中显示RSS源中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆