Basically ready
Pre-release
Pre-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 \n
wherever 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));
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));
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));