title: Creation of buttons for SpriteKit
body: <p>I am creating the main menu for a sprite kit application I am building. Throughout my entire project, I have used SKScenes to hold my levels and the actual gameplay. However, now I need a main menu, which holds buttons like "Play," "Levels," "Shop," etc... However, I don't feel really comfortable the way I am adding buttons now, which is like this:</p>
  
  <pre><code>let currentButton = SKSpriteNode(imageNamed: button)  // Create the SKSpriteNode that holds the button
  
  self.addChild(currentButton) // Add that SKSpriteNode to the SKScene
  </code></pre>
  
  <p>And I check for the touch of the button like this:</p>
  
  <pre><code>override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {
      let touch = touches.first
      let touchLocation = touch!.location(in: self)
  
      for node in self.nodes(at: touchLocation) {
          guard let nodeName = node.name else {
              continue
          }
          if nodeName == ButtonLabel.Play.rawValue {
              DispatchQueue.main.asyncAfter(deadline: .now()) {
                  let transition = SKTransition.reveal(with: .left, duration: 1)
                  self.view?.presentScene(self.initialLevel, transition: transition)
                  self.initialLevel.loadStartingLevel()
              }
              return
          }
          if nodeName == ButtonLabel.Levels.rawValue {
              slideOut()
          }
  
      }
  }
  </code></pre>
  
  <p>However, I don't know if this is considered efficient. <strong>I was thinking of using UIButtons instead, but for that would I have to use an UIView?</strong></p>
  
  <p>Or can I add UIButtons to an SKView <strong>(I don't really get the difference between an SKView, SKScene, and UIView)</strong> What is recommended for menus?</p>