Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lsu420luv

macrumors newbie
Original poster
Jul 23, 2009
2
0
what would be the best way to store a list of questions and then the answers? I was thinking of just creating a text file and loading them into an array of NSSTring's by each line? is this the best way
 
Depends on what 'best' means.

How many questions do you have?
Do the questions and answers have exactly the same format (same number of choices etc.)?

Will you want to update these questions at some point? From the internet?

What technologies to you already know and which are you willing to learn?

The obvious choices are:

a simple text file format
plist file
xml file
sqlite database
html file that has the text of the question already in it
directory of files where each text file has the text of one question in it
compile the questions and answers into your app as a data structure made up of static strings or as components of an array of structs

For a modest number of questions I would most likely use the plist file. I would build the file in code from a set of strings.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.