I'm trying my best to use my "responsive" / "adaptive" knowledge to apply it to positioning in my SKScene
.
However, it would appear there's a problem. As the width / height of the scene aren't accurate.
In this example, the view's anchor point is centerpoint i.e 0.5, 0.5.
SKLabelNode *label = [SKLabelNode labelNodeWithText:@"Welcome to the table..."];
label.position = CGPointMake(0,0);
label.alpha = 0;
[self addChild:label];
now let's say, I want to move that to the bottom of the screen. I use the screen sizing logic so I can apply it for every device.
label.position = CGPointMake(0, self.view.frame.height/2 + label.frame.height);
From what I can see, it should align the X to the anchor point, then deduct y from the anchor point. So CenterPoint - half screen height + label height.. However, this isn't the case. It's offscreen somewhere not working accurately.
I've also tried this with self.frame.size.height
& self.view.bounds.size.height
It sounds like the size of your
SKScene
doesn't match the size of itsSKView
. Try setting thescaleMode
of your scene toResizeFill
. From theSKScene
documentation onResizeFill
: