此代码在模拟器中工作。当我们加载到设备中时它不起作用。在控制台中它显示错误为:
Unable to load font BARBATRI.ttf
我的代码是:-
CCLabelTTF *score = [CCLabelTTF labelWithString:[NSString stringWithFormat:@"Score : %d",[CommonUserDetails sharedUserDetails].GameScore] fontName:@"BARBATRI.ttf" fontSize:18];
score.position = ccp(240,160);
score.anchorPoint = ccp(0.5, 0.5);
[self addChild:score];