tags:

views:

60

answers:

1

I am new to iphone development and I could use a little help in setting up my .plist file. I seem to be confused as to how to actually set it up. I have an app that will have a Frequently Asked Question (FAQ) page or view. As of right now, I am putting the questions in a property List file (.plist) configured like this: http://img16.yfrog.com/img16/6225/picture1zrf.png

I am not sure where to use a dictionary type or an array type. There are a lot of FAQs and would like to have them searched and indexed. As of now there are 8 groups of FAQs and each group of FAQs can have several sections and under each section, the actual questions and its answers are provided. Am I on the right track with this? Please help. Any help is welcomed.

A: 

It would seem you are on the right track. In general an array is a sequence of items (each value has a corresponding index used for lookup), where a dictionary is an associative container (each value has a corresponding key used for lookup).

The one thing I would change, however, is to make the keys for the faq dictionaries be a little simpler to index. You have the questions in the faq's dictionaries already so the key itself does not need to contain it. Instead it would appear the faq id would be a good value to use as a key.

fbrereto