views:

32

answers:

1

I've not found a answer to this question anywhere, but this seems like a typical problem: I am dynamically (from a xml file) creating a view to display "Questions" I take from the XML file. I am having problems to display multiple choice questions. I am trying following approach:

Question 1
MultipleChoiceQuestion 2
--First Option
--Second Option
--Third Option
Question 3
Question 4
MultipleChoiceQuestion 5
--First Option
--Second Option
and so on...

So, my Idea is: I have a first UITableView and row for each "normal" question , and a second UITableView for each "Multiple Choice" question that should be loaded into a row from the first UITableView as I showed before.

Is this a good approach or you guys have a better design pattern for this issue?

Thanks a lot!

+3  A: 

No, no! Please, no! Do not place big UI Elements like table views in a tableviewcell (and surely do not make them scrollable =P).

What about making the user be able to select a question (one question per row) and then show up a picker view with answers, on the place where to keyboard would normally be?

Just like a list of HTML select tags in Mobile Safari.


Or you can use a grouped table view with one group per question, including the chosable answers.

Time Machine
+1 Or just custom cells. Calculating the height is not that hard. Golden rule: If you think a problem is common but nobody has done it that way before, there's a probably a good reason for it.
Eiko
Thanks for fast answer Baard. I can't use a Picker, cause the User should be able to choose more than one option. So, I am gonna try your second recommendation: grouped table view with one group per question!Thanks again!!!
jcdmb
Don't forget to mark this as accepted if it helped you ;)Also, sketching your app idea and UI on paper with a pencil (or on a stone with a hammer) before creating your final app in Xcode/IB helps you prevent these frustrations.
Time Machine
See http://www.hongkiat.com/blog/useful-offline-utensils-and-toolkits-for-designers/ and http://stackoverflow.com/questions/1287898/what-advantages-does-sketching-a-user-interface-on-paper-have for sketching information.
Time Machine
or if they click on a question show a new table view controller with the choices? PS +1 to the answer purely for the first sentance!
deanWombourne