Game Development Reference
In-Depth Information
Now expand the Utilities view on the right side of Xcode and click Show the Identity in-
spector button. You will see the custom class of this UIViewController is your
GameViewController.swift . Figure 1-6 shows you this connection.
Figure 1-6 . The custom class GameViewController
There is one last thing to look at before you get back to the code portion of this tour. Go
back to the Utilities view and select the Connections inspector. Notice the View outlet is
connected to your GameViewController.view . Figure 1-7 shows this connection.
Figure 1-7 . The View outlet
The point of going through this examination of the storyboard is to show that while Sprite
Kit is used to create games, the technology used to create games is just like what you
would use to create any modern iOS app.
The GameViewController Class
Let's get back to the code. You can ignore AppDelegate.swift —it is the same boil-
erplate code you use to start all iOS Swift applications. GameViewControl-
ler.swift is the best starting point. I included it earlier, but for the sake of convenien-
ce it is listed here again:
import SpriteKit
Search WWH ::




Custom Search