1

我有一个我无法解决的问题。

这里是:
我正在尝试为 iPhone 制作一个收音机应用程序。我正在使用在线流,所以我想在标签中显示当前歌曲。
怎么做?
这是当天的歌曲和当前歌曲的列表: http: //live.radioeuphoria.bg :41232/played.html?sid=1 。

那么,如何获取显示当前歌曲的 HTML 元素呢?
如何在 Xcode 中做到这一点?

4

1 回答 1

1

您可以使用NSURLConnection将 html 作为字符串获取。然后用于NSXMLParser获取标签和值。

NSURLConnectionhttps ://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html

NSXMLParserhttps ://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/Reference/Reference.html

于 2013-03-14T10:39:15.383 回答