SKPopMenu: Swift tile-based menu for SpriteKit
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SKPopMenu 🎈

Swift tile-based menu for SpriteKit


  • Supports 1-6 menu items
  • Customize each menu item with a color and a label or sprite.


Drag and drop SKPopMenu.swift into your Xcode project


In your SKScene, add the following:

let pop = SKPopMenu(numberOfSections:6, sceneFrame: self.frame)

Note: If you choose an odd number of items, the top-most item will be fullscreen width.

To set all sections to the same color:


To set a specific color to section 1:

pop.setSectionColor(1, color: SKColor.magentaColor())

To change the text label of section 3:

let myLabel = SKLabelNode()
myLabel.text = “hello”
pop.setSectionLabel(3, label:label)

To add a sprite to section 5:

pop.setSectionSprite(5, sprite:SKSpriteNode(imageNamed:”pop”)

To change the name of section 6:

pop.setSectionName(6, text:”Contact”)

To show the menu:

pop.slideUp(0.2) // duration is NSTimeInterval

To hide the menu:

pop.slideDown(0.2) // duration is NSTimeInterval

Show/hide example:

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
  if pop.isShowing {
  } else {

Delegate methods (optional)

Add the protocol to your SKScene’s class definition:

GameScene: SKScene, PopMenuDelegate {}
Remember to set pop.popMenuDelegate = self

To get notified when a section is tapped:

func sectionTapped(index:Int, name:String) {
  if pop.sections[index].name == "email" {
    // email section tapped

To get notified when the menu has appeared/disappeared:

func popMenuDidAppear() {
  // pop menu appeared
func popMenuDidDisappear() {
  // pop menu... wait for it... disappeared 😱