O'Reilly logo

Swift Game Development - Third Edition by Stephen Haney, Siddharth Shekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required