Combining SpriteKit and UIKit

As SpriteKit and User Interface Kit (UIKit) are frameworks that are available in iOS, we can expect to combine them in different ways. Actually, we can create games with SpriteKit and include components from UIKit and, on the other hand, we can create applications that show the elements that were created with SpriteKit.

These features give us great power and versatility, as we can join the capabilities provided by both the frameworks to create robust games or give a more dynamic look to existing applications.

In the following lines, we are going to learn how to use UIKit with SpriteKit and vice versa. So let's start by adding some element from UIKit into the game.

Including UIKit in a game

As you may already know, if ...

Get Getting Started with SpriteKit 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.