开发者

Passing plist data from one view to another

I have a plist that's populating my tableViews & navigation controller, and 开发者_JS百科goes at least 2 levels down, after that I have a detail view. I'm then trying to put a table view in the detail view that only takes up half the screen. What I need to do is pass the 'position' within the plist into the detail view, so I can populate the table view with the right information from the plist.

The information I need for the table view is 'buried' within the plist, so if I need to introduce the plist to the new detail view, I'm not sure how to get back to the point within the plist that I was at in the table view that I just came from.

I hope I'm explaining this well enough for it to make sense.

Many thanks!


'plist' (i.e. property list) is just a file format. Once you read it into memory, it becomes an object graph -- dictionaries, arrays, strings, & dates all connected to each other. When you create your detail controller, you can pass it just the part or parts of that graph that it needs. So maybe your table displays data that's stored as an array of dictionaries. When you create the detail controller, you'd probably want to pass it the dictionary from the array that corresponds to the selected row.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜