开发者

How to read XML file and display it in UITableView?

开发者 https://www.devze.com 2023-02-07 20:17 出处:网络
I need to display an XML file in a UITableView.Also, if I click on one of 开发者_开发问答the tableRow, it should open in new view.That\'s two fairly big tasks for a two-sentence question. One approach

I need to display an XML file in a UITableView. Also, if I click on one of 开发者_开发问答the tableRow, it should open in new view.


That's two fairly big tasks for a two-sentence question. One approach to reading an XML file would be to use NSXMLParser. Apple has a good document describing how to use it. Start with that and post more questions here if you get stuck. You'll usually find that more specific questions get more specific answers.

Oh. I just noticed the question is six months old. I guess that proves my point.


Please try the following steps and ask more specific questions if you get stuck:

  1. Download the Data using NSURLConnection
  2. Use NSXMLParser to parse the data and store it in a collection (NSArray is probably what you want).
  3. Use UITableView's Delegate and datasource methods to create cells and respond to cell selections.
0

精彩评论

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