Setting outlets and adding variables

In the ViewController class, we will create the outlets for the buttons and labels and add the required variables for our program.

To get access to the buttons, views, and other objects we created in Main.Storyboard, click on the Assistant Editor (middle of the three buttons on the top right with the two circles). This will open a second window. Now select Main.Storyboard and make sure the ViewController class is also visible to the right of the Assistant Editor, as shown in the following screenshot:

Setting outlets and adding variables

Now select SessionInfoView. While holding the Control key on the keyboard, left-mouse click and drag it into the ...

Get Swift Game Development - Third Edition now with O’Reilly online learning.

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