Buttons are the primary way to navigate between different scenes. In this section, we will take a look at how to add buttons to the scene.
Buttons are also similar to regular sprites. In the case of buttons, we need two images. One image is shown when the button is normal, which means that it is not pressed, and the other image is shown when the button is pressed.
For this section, the resources are provided in the resources folder of this chapter. There are four images in total for the iPad and iPad HD—two for normal mode and two for button pressed. Copy these four files in the
Resource/Publishes-iOS folder on your system.
Also, add the following code at the top of the
MenuScene.m file to import the