Question

I am designing an exam practice app that will have the following format, requiring the user to rank the answer 1-5 to sections A-E (using a scroll view) for the same question that will be displayed at the top.

Here is an image:

enter image description here

Each question therefore has 5 parts. I am unsure of what is the best way to store the questions and answers. I read something about plists. Would that be the way to do it? If so, could you recommend any tutorials with images?

Just to clarify, the labels A-E are where the text for the subsections will go and the user will have to rank the appropriateness for each of these.

Thank you!

Was it helpful?

Solution

Few options here:

1. Core Data

Prepopulate .sqlite file with questions and include with app. Keep track of user's progress and attempts and whatever other stats.

This approach also give your ability to label questions by a topic (or any other criteria) and present questions to user that they need or that they failed most.

2 Get data from server

A bit more complicated but offers more benefits. With this approach you would be getting questions in json format.

Benefit of this approach is that you can add any number number of questions and tests without resubmitting your app.

3. Store as text/plist with app

Yes, you can also store your questions as text in plist or json format and as app loads populate core data or keep it in memory to display. The latter approach, however, would offer the least amount of benefit and flexibility to the user.

OTHER TIPS

I suggest using SQLite. See Ray Wenderlich's Tutorial on SQLite for iOS And there is obviously a not so suitable but easy way and that is using property lists as key and value pairs which i do not recommend.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top