Errata in iOS Programming, 6th Ed

Agreed. It would also be cleaner to set the alpha inside animateLabelTransitions:

    func animateLabelTransitions() {
        // Animate the alpha
        self.questionLabel.alpha = 0
        UIView.animate(withDuration: 0.5, animations: {
            self.questionLabel.alpha = 1
        })
    }
1 Like