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开发者_JAVA百科 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!
There is a tutorial for creating custom UITableViewCells with UITableView inside it at: http://iosstuff.wordpress.com/2011/06/29/adding-a-uitableview-inside-a-uitableviewcell/
iOS SDK is flexible and you can add any UIView subclass element to tableview cells. Have a look at 'Pulse', its a news reader app that won Apple Design Award. This app has horizontally scrollable images and its developers explained that how they used UITableViews to create that. So don't be afraid to implement new ideas no matter how wild they might appear.
Good Luck!
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.
精彩评论