Description
For this homework you will implement a simple app called QuizApp that displays a quiz question,
possible answers, and the result of your selection. See screen shots below. Specifically,
1. In Xcode, create a New Project as an iOS Single View App called QuizApp.
2. On the StoryBoard, add a label at the top of the view with the app’s name “Quiz App”.
Below that add a label with the quiz question. These labels should be centered horizontally
and constrained to be appropriately spaced at the top of the view.
3. Below the question, add a vertical stack view to hold buttons for the 3-5 alternative
answers. The button text should be left-aligned, and the stack view should be centered.
4. Centered below the alternative answers, add a label to show the result of your guess, e.g.,
“Correct” or “Incorrect”. This label should be initially hidden.
5. Add outlets, actions, and supporting code to the View Controller so that the user can tap
the buttons to guess, only the tapped button turns red, and the appropriate result is shown
in the result label. The user should be able to guess multiple times.
6. Be sure that auto layout constraints are set so that the view elements are appropriately
displayed regardless of device orientation.
2
StoryBoard:
Simulator: