title: Background image size Sprite Kit Game
body: <p>i just started a new Sprite Kit project to learn how to use it. I watched and read a lot of tutorials but no tutorial has a answer for my question/problem.</p>
  
  <p>I want to create an application just for my iPhone 5S. So the screen size is 1136x640. I created a 1136x640 background image for my application. But when i add the image to my app, its waaay to big! The iOS Simulator just displays the middle of the image. </p>
  
  <p>Can someone tell me what screen size i have to use and why? </p>
  
  <p>Thanks a lot! </p>
  
  <p>Here is the code which i copied from a tutorial.
  The code is in the myScene.m file in the initWithSize method</p>
  
  <pre><code>        SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"myBackground"];
      background.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMidY(self.frame));
  
      [self addChild:background];
  </code></pre>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I searched on google and found this:</p>
  
  <p>The viewDidLoad method has to be changed with "viewWillLayoutSubviews".</p>
  
  <p>Here is this method:</p>
  
  <pre><code>    - (void)viewWillLayoutSubviews
      {
      [super viewWillLayoutSubviews];
  
      // Configure the view.
      SKView * skView = (SKView *)self.view;
      skView.showsFPS = YES;
      skView.showsNodeCount = YES;
  
      // Create and configure the scene.
      SKScene * scene = [MyScene sceneWithSize:CGSizeMake(skView.bounds.size.width*2,skView.bounds.size.height*2)];
      scene.scaleMode = SKSceneScaleModeAspectFill;
  
      // Present the scene.
      [skView presentScene:scene];
  }
  </code></pre>
  
  <p>At first the scene = MySceneWithSize line was:</p>
  
  <pre><code>SKScene * scene = [MyScene sceneWithSize:skView.bounds.size];
  </code></pre>
  
  <p>But then it was just the half of the iPhone 5 screen size (568x320). So i had to double the size. Does somebody know why?</p>