Displaying content from an RSS feed in an iphone app

不问归期 提交于 2019-12-24 02:30:21

问题


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

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

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.

Thanks in advance


回答1:


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.

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.

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

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.



来源:https://stackoverflow.com/questions/3668762/displaying-content-from-an-rss-feed-in-an-iphone-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!