ive just learning SpriteKit and Objective-C and i wonder why the origin of my view is out of the screen. I just created a default SpriteKit project within xCode 6 and simply just added an NSLog to show me the current location of the touch. The output on the console shows me, that this location is on 260.0 for the x-coodrinate and not near 0.0.
An Example that describes my problem within the scene implementation file: when i add a SKSpriteNode with a background image and position it on the origin of the screen with:
-(void)didMoveToView:(SKView *)view {
...
SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"Starfield"];
background.anchorPoint = CGPointZero;
background.position = CGPointZero;
[self addChild:background];
...
}
the picture is also out of the screen and not at the left bottom corner, where the anchorPoint was set.
I tried it in landscape mode, with all kinds of devices (iPhone4S,5,6,6+) and in pure portrait mode, but it also doesnt work. Thanks for help.
Greatings,
Martin