Skip to content

Basically ready

Pre-release
Pre-release
Compare
Choose a tag to compare
@nickfalk nickfalk released this 16 Apr 20:18
· 20 commits to master since this release

No known issues as such, should work as intended in most cases but has not been tested in a rough environment over time. Usage: like you would use a regular SKLabelNode, just add \nwherever you would like a line break. The distance between lines can be adjusted through the lineSpacing property, like so: labelNodeInstance.lineSpacing = 1.0; the default value is 1.5.

Output examples:

NORLabelNode *multiLabel = [NORLabelNode labelNodeWithFontNamed:@"Chalkduster"];
multiLabel.text = @"Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt\nut labore et dolore magna aliqua.";
multiLabel.fontSize = 12;
multiLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeCenter;
multiLabel.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame));

ios simulator screen shot 16 apr 2014 22 07 31

NORLabelNode *multiLabel = [NORLabelNode labelNodeWithFontNamed:@"Chalkduster"];
multiLabel.text = @"Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt";
multiLabel.fontSize = 12;
multiLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeLeft;
multiLabel.position = CGPointMake(0, CGRectGetMidY(self.frame));

ios simulator screen shot 16 apr 2014 22 11 16

NORLabelNode *multiLabel = [NORLabelNode labelNodeWithFontNamed:@"Chalkduster"];
multiLabel.text = @"Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt";
multiLabel.fontSize = 12;
multiLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeRight;
multiLabel.position = CGPointMake(CGRectGetWidth(self.frame), CGRectGetMidY(self.frame));

ios simulator screen shot 16 apr 2014 22 16 31