December 2016
Intermediate to advanced
416 pages
15h 21m
English
The animation works great the first time the Next Question button is pressed, but there is no visible animation on subsequent button presses because the label already has an alpha value of 1. In this section, you are going to add another label to the interface. When the Next Question button is pressed, the existing label will fade out while the new label (with the text of the next question) will fade in.
At the top of ViewController.swift, replace your declaration of a single label with two labels.
@IBOutlet var questionLabel: UILabel!@IBOutlet var currentQuestionLabel: UILabel! @IBOutlet var nextQuestionLabel: UILabel! @IBOutlet var answerLabel: UILabel!
Xcode flags four places where you need to replace questionLabel ...
Read now
Unlock full access