我正在将不同的文本加载到 SKLbeNode 中,它在 iPhone5、模拟器等上运行良好......但在 iPhone4 上,我有时只会得到一条黑线,而不是文本。
奇怪的是总是相同的文本产生失败,但我不知道发生了什么。
代码是:
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;
当我更改文本时,只需使用
ButtonLabel.text=NewString;
可能是什么问题?