title: Sprite Kit how to update an image on a button?
body: <p>I am new to Swift and Sprite Kit.</p>
  
  <p>I want in MyScene.swift to create a button that has a specific image. Every time I click on the button I want to change the button image with a new image.
  How can I do that?</p>
  
  <pre><code>GameScene.swift
  
  class GameScene: SKScene {
  var rollButton:SKSpriteNode = SKSpriteNode(imageNamed: "dice1.png")
  
   override func didMoveToView(view: SKView) {
  
   rollButton.position = CGPoint(x: 79, y: 290) //this position is based to what? Is there an easier way to put a button using storyborard
  
    rollButton.setScale(0.5) //what does setScale mean?
  self.addChild(rollButton)
  }
  
   override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
    for touch: AnyObject in touches {
      if CGRectContainsPoint(rollButton.frame, touch.locationInNode(self)) {
        changeButtonImage()
      }
     }
   }
  
  func changeButtonImage() {
  //radom get value beteween 1 - 6
  change the rollButton image with a new value??? //how to do that
  }
  </code></pre>
  
  <ol>
  <li>Is there a way i an add a UIButton on Storyboard and than connect
  GameScene,swift with that storyboard? (adding child nodes
  programatically can be really hard)</li>
  <li>The CGPoint of a node is based to what? the current UIView?</li>
  <li>How to programatically change the image of a button (in swift using
  SpriteKit Node) with other images if for example I have the images:
  dice1, dice2, dice3... </li>
  </ol>
  
  <p>This is the objective C code:</p>
  
  <pre><code>NSString *fileName = [NSString stringWithFormat:@"dice%d.png", num];
  // Setting the uiimageview to the appropriate image
  self.rollButton.image = [UIImage imageNamed:fileName];
  </code></pre>
  
  <p>I didn't find any good example with how to set buttons from storyborard and than using uiviewcontrollers to each new GameScene created,</p>