Discussion Forums  >  Uncategorized

Replies: 4    Views: 270

G8torBrent
Aspiring developer
Profile
Posts: 27
Reg: Mar 04, 2011
location unknow...
270
03/18/11 03:07 PM (14 years ago)

Quiz on iOS only draws from first five questions

Hi all, Loving what I can do. But as I run the quiz, which consists of five questions (there are 15 questions banked), it keeps pulling the same five questions. Did a brief test on the Android emulator and got different questions. The app is currently installed on my iPhone 4. Thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/18/11 05:25 PM (14 years ago)
Hmm... we've havn't heard this before (there thousands of quizzes in the wild). Kindly post the app name as it appears in your control panel, I'll get a look.
 
G8torBrent
Aspiring developer
Profile
Posts: 27
Reg: Mar 04, 2011
location unknow...
270
like
03/18/11 05:46 PM (14 years ago)
Missing Egg. Could it be that I'm running it on my phone in simulator mode and not as a release?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/18/11 11:00 PM (14 years ago)
Hi again... just looked. Team Eggie - awesome. I sucked at the quiz! So, here's the thing. It is working as designed but may not behave as you expect. Side note: If you're a tech-nerd, have a look at QuizViewController.m in the Screen_Quiz folder. The randomizing happens around line 290. OK, so the way it works is it's using iOS native random() function to randomize the number of questions. Because you're using a very small number (5), there is a very high probabily that the questions will start at one. Try a larger number of questions and see if it changes the behavior. I took used the refresh button and restarted the quiz 5 times. It started twice with 'How many pounds of Easter treats do americans eat each year' (the fourth question in the list), Once with 'What percentage of people eat the ears on chocolate bunny first' (the third question in your list) and twice with 'how much did the worlds largest omelet weight' Nothing to advise besides increasing the number a bit?
 
G8torBrent
Aspiring developer
Profile
Posts: 27
Reg: Mar 04, 2011
location unknow...
270
like
03/19/11 11:15 AM (14 years ago)
Thanks David. I'll add some more questions but I'll also have a look-see at the code. Enjoy your weekend.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.