title: Set the frame of scene to be size of the iPhone screen
body: <p>Hi I am new to sprite kit and for some reason when using self.frame.size.width or .height to position buttons or subviews in the scene they are not centered but rather sometimes show up completely off screen. Does anyone know how to set the frame size to be the size of the iphone/ipad im using?</p>
  
  <p>here is my code when presenting a subview when player loses</p>
  
  <pre><code>func presentGameOverView() {
  
      if firstTime == true {
          let gameOverView = UIView()
          gameOverView.frame = CGRectMake(self.frame.size.width / 2.0, self.frame.size.height / 2.0, 200, 200) //should be center of screen
          gameOverView.backgroundColor = UIColor.redColor()
          playGameOverSound()
          self.view?.addSubview(gameOverView)
          firstTime = false
      }
  }
  </code></pre>
  
  <p>here is part of the gameViewController.swift</p>
  
  <pre><code>extension SKNode {
  class func unarchiveFromFile(file : NSString) -&gt; SKNode? {
      if let path = NSBundle.mainBundle().pathForResource(file, ofType: "sks") {
          var sceneData = NSData(contentsOfFile: path, options: .DataReadingMappedIfSafe, error: nil)!
          var archiver = NSKeyedUnarchiver(forReadingWithData: sceneData)
  
          archiver.setClass(self.classForKeyedUnarchiver(), forClassName: "SKScene")
          let scene = archiver.decodeObjectForKey(NSKeyedArchiveRootObjectKey) as GameScene
          archiver.finishDecoding()
          return scene
      } else {
          return nil
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>class GameViewController: UIViewController {</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
  
      if let scene = GameScene.unarchiveFromFile("GameScene") as? GameScene {
          // Configure the view.
          let skView = self.view as SKView
          skView.showsFPS = true
          skView.showsNodeCount = true
  
          /* Sprite Kit applies additional optimizations to improve rendering performance */
          skView.ignoresSiblingOrder = true
  
          /* Set the scale mode to scale to fit the window */
          scene.scaleMode = .AspectFill
  
  
          //display banner Ads
          //self.canDisplayBannerAds = true
  
          skView.presentScene(scene)
      }
  }
  </code></pre>