5.4.6 QuizViewController Outlets and Actions

Open the Assistant Editor, then create the following outlets and actions:

• Use the techniques you learned in earlier chapters to create @IBOutlets in class QuizViewController for the flagImageView, questionNumberLabel and answerLabel in Fig. 5.10.

Control drag from the first Segmented Control to the QuizViewController as you normally do, but in the outlet popover that appears, for Connection select Outlet Collection and name the outlet collection segmentedControls. Also, since this action will be used only for Segmented Controls, choose UISegmentedControl for the Type (i.e., the type of the action’s sender parameter). Next, control drag from the remaining Segmented Controls (in order from top to ...

Get iOS® 8 for Programmers: An App-Driven Approach with Swift™, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.