0

labelNode working on similator with font i selected.But It doesn't work on my real device iPad. And It loading with delay on device. It works so nice on simulator.

-(void)setupUI
{
SKLabelNode *scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"Bloody"];
scoreLabel.fontColor = [SKColor redColor];
scoreLabel.fontSize = 20.0;
scoreLabel.text = @"SCORE: 0";
scoreLabel.name = @"scoreLabel";
scoreLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
scoreLabel.position = CGPointMake(self.size.width/2, self.size.height scoreLabel.frame.size.height);
[self addChild:scoreLabel];
}

1 Answers1

0

The reason why it's not working is that you are trying to use a custom font, which is not available on device. You need to add the font to the project. Check this answer: Custom Fonts in Xcode 5 . You will need to add the font file to the project and also it's information in info.plist.

Community
  • 1
  • 1
Lucas Domene
  • 284
  • 1
  • 2
  • 16