SKLabelNode创建黑线并且在iPhone4上不显示文本 [英] SKLabelNode creates black line and not showing text on iPhone4

查看:83
本文介绍了SKLabelNode创建黑线并且在iPhone4上不显示文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将不同的文本加载到SKLabeNode中,它可以在iPhone5,模拟器等上正常工作,但是在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.

代码是:

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;

可能是什么问题?

推荐答案

我已向Apple提交了有关此错误的错误报告.几周后,他们答复并要求使用更新的IOS检查该问题.它工作得更好并且接受了更长的文本.后来他们完全解决了问题.

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.

这篇关于SKLabelNode创建黑线并且在iPhone4上不显示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆