Article

Creating a Scene with a Transparent Background

Set a transparent background color to show the content of the views below.

Overview

To overlay content rendered with SpriteKit on top of another view, follow these steps:

  1. Set the scene's backgroundColor to clear.

  2. Enable allowsTransparency on the view.

  3. Set the view's backgroundColor to clear.

See Also

Setting the Background Appearance

var view: SKView?

The view that is currently presenting the scene.

var backgroundColor: UIColor

The background color of the scene.