Reputation: 191
I'm making a simple quiz app with Parse and Swift. Both questions and answers are stored in the cloud. I have one class in Parse called Test_Questions and another called Question_Answers.
Question_Answers has a column of type pointer, to the question that these multiple choice answers belong to. Each question has 4 possible answers.
I want to return all answer objects belonging to a question as an array using Swift, and access these individual indexes so I may amend the text in my buttons accordingly.
Any ideas how?
Upvotes: 0
Views: 102
Reputation: 6790
You can act on each pointer as a PFObject and add them or do whatever you would like. Depending on what you do, you may need to fetch the object the pointer is pointing to first. (That's just PFObjectName.fetchIfNeeded(). )
Upvotes: 0