If you just want the labels aligned so that they are right aligned, use the right alignment mode.
myLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeRight;
However, if you try to create a rectangle around SKLabelNode, you will find that calcAccumulatedFrame does separate the spaces before calculating the label width and returns the wrong size.
But you can fool - use the symbol as a label for the size of the layout to add the size of your frame.
SKLabelNode* dummyPaddingLetter = [SKLabelNode labelNodeWithFontNamed:<your font name>]; dummyPaddingLetter.fontSize = <your font size>; dummyPaddingLetter.text = @"W";
Now add as many multiples of fOneSpace as possible to the width of your rectangle, and this will probably be correct.
Gilesdmiddleton
source share