Crafting a Basic Menu with UIKit’s Interface Builder
For our first task, we’re going to build a simple menu that lets the player choose either Easy or Hard mode. This mode setting will determine how often the obstacles appear on the screen. We’ll provide a Play button that will transition the player immediately into the game. And as soon as the ship is destroyed, we’ll send the player back out to the menu.
Up to this point we’ve been engrossed in Sprite Kit. It’s a powerful and self-contained engine in its own right. But we don’t have to abandon Apple’s time-tested UIKit, especially with useful tools such as Interface Builder to help with layout and navigation. While we could build controls in Sprite Kit by laying out nodes and manually checking ...
Get Build iOS Games with Sprite Kit now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.