When the app launches, it automatically loads the view that is designated as the Main Entry Point, identified in Interface Builder by the Main arrow, as shown in the following figure:
In addition to performing duties of its own,
InterfaceController creates two objects on which it must call. Firstly, an instance of our
GameLogic class and secondly, an instance of
NSTimer with which we will control the timing of the flashing colors.
In contrast to some languages, in Swift we can both declare these properties and instantiate them at the same time. Add the following code to the
InterfaceController class below the
@IBOutlet var greenGroup...