Releases: nickfalk/NORLabelNode
The preparing for podspec / OSX compatibility release
Ads the LICENSE file craved by podspec.
The label should now work with OSX as well as iOS.
Some cleaning up of superfluous* code.
*please, please, please let it be superfluous!
The default fontSize release
What's new?
Fixes a bug from version 0.9.0 where the lineSpacing
property would have no effect whatsoever.
Added default fontSize so that labels without specified fontSize will also work as expected.
Removed flakey frame getter.
Output examples:
NORLabelNode *multiLabel = [NORLabelNode labelNodeWithFontNamed:@"Baskerville"];
multiLabel.text = @"Cattle die,\nkinsmen die\nyou yourself die;\nI know one thing\nwhich never dies:\nthe judgment of a dead mans life.";
multiLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeCenter;
multiLabel.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame));
Applying changes to the label:
multiLabel.fontColor = [SKColor yellowColor];
multiLabel.fontName = @"Helvetica";
multiLabel.position = CGPointMake(20, CGRectGetMidY(self.frame));
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeLeft;
Basically ready
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));