Skip to content

The default fontSize release

Pre-release
Pre-release
Compare
Choose a tag to compare
@nickfalk nickfalk released this 18 Apr 09:51
· 10 commits to master since this 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));

ios simulator screen shot 18 apr 2014 08 48 27

Applying changes to the label:

multiLabel.fontColor = [SKColor yellowColor];
multiLabel.fontName = @"Helvetica";

ios simulator screen shot 18 apr 2014 11 45 35

multiLabel.lineSpacing = 2.0;
ios simulator screen shot 18 apr 2014 11 46 29

multiLabel.position = CGPointMake(20, CGRectGetMidY(self.frame));
multiLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeLeft;

ios simulator screen shot 18 apr 2014 11 49 57