Skip to content

Releases: nickfalk/NORLabelNode

The preparing for podspec / OSX compatibility release

18 Apr 20:04
Compare
Choose a tag to compare

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

18 Apr 09:51
Compare
Choose a tag to compare
Pre-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

Basically ready

16 Apr 20:18
Compare
Choose a tag to compare
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 \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