Let us make some changes to the
GameScene class to make it our main menu scene:
MainMenuScene.swiftby selecting the file in the project hierarchy in the project navigator.
touchesBeganfunction, delete the code related to the adding of the sprite and the running of the action upon it.
updatefunction as it is not required for the main menu scene. If required, we will add it later.
MainMenuScene.swift file should look like the following code snippet, as we deleted all the code from the
didMoveToView function and modified the
import SpriteKit class MainMenuScene: ...