*Xcode Project Entry 2* F1 Quiz - part 2

Here we go! No chance to code on Christmas or Boxing Day but I'm back! I have around an hour or so to work on the next bit of the project. Last time, I got the views (including stack views), constraints and main question/answer bit of codes sorted. However, the next challenge will be communicating all of that so the questions/answers can be accessed! I'm going to try out a couple of things and when (yes, when!) that fails, look at Angela's Quizzler project for some inspiration.

Start Time - 9:45



That's what I got last time in terms of the view. Yes, I will need some colour but I will do that last. Last time, I did that first and perhaps did a less than ideal version.

So, cracking on with the actual code. How to do this?

This is what I want -

For the 'next question' to be randomly from drivers, numbers or cars array, then to choose one of these at random to be shown on the question label.

Then the correct answer (the key-value pair) needs to be on one of the 4 answers at random. The other three answers need to be populated with other, erroneous answers.

This is going to be hard! But I'll give it a go.

First of all, the random aspect....

OK I tried! And what I have doesn't work. Let's check out Angela's quizzler app...

Right, so you know when to admit defeat? This is one of those times! Creating a quiz app with so many variables was far too ambitious. Time to scale down!

Instead of 4 answers, just two - true or false!

Question bank can change to facts now and it doesn't matter about the type of question. MUCH easier!

*Doing the four option quiz is something to try ANOTHER time!

Finish Time - 11:56 (2 hours 11 minutes)

So we're pretty much there! Unfortunately I have to stop there - right on the cusp of sorted it. To be fair I needed a LOT - as in almost virtually all of - help from Angela's course. I have learned some interesting things along the way, which I will go into more detail when I come back to this tomorrow afternoon. Some good progress, just a little frustrating that I wasn't ready for the multiple choice answer - that's something I will look at another time!

Comments

Popular posts from this blog

*Xcode Project Entry 2* F1 Quiz - part 1

Angela Yu Course Part 10 (up to lesson 112)

Angela Yu Xcode 12 Course - Part 7 (lectures 74 to 79)