Search code examples
sprite-kitiphone-4sklabelnode

SKLabelNode creates black line and not showing text on iPhone4


I am loading different texts into a SKLabeNode it works fine on iPhone5, simulator, etc... but on iPhone4 I sometimes just get a black line, instead of the text.

It is weird that always the same texts are generating the failure, but I cannot figure out what is happening.

The code is:

ButtonText=@"";

    ButtonLabel=[SKLabelNode labelNodeWithFontNamed:@"Marker Felt"];
    ButtonLabel.fontSize=46;
    ButtonLabel.text=ButtonText;
    ButtonLabel.position=CGPointMake(0, 0);
    ButtonLabel.verticalAlignmentMode=SKLabelVerticalAlignmentModeCenter;
    ButtonLabel.horizontalAlignmentMode=SKLabelHorizontalAlignmentModeCenter;
    ButtonLabel.colorBlendFactor=1.0f;

When I am changing the text, simply using the

ButtonLabel.text=NewString;

What can be the issue?


Solution

  • I have filed a bug report on this bug to Apple. After few weeks they replied and requested to check the issue with the updated IOS. It worked better and accepted longer texts. Later they fully solved the problem.