2

我尝试了以下方法:

UIColor *c = [UIColor colorWithPatternImage: [UIImage imageNamed: @"gradient.png"]];
CCColor *cc = [CCColor colorWithUIColor: c];
lblLevelName = [CCLabelTTF labelWithString: @"Level" fontName: @"" fontSize: 18.0f];
lblLevelName.anchorPoint = ccp(1.0f, 1.0f);
lblLevelName.position = ccp(screen.width - 20.0f, screen.height - 75.0f);
lblLevelName.fontColor = cc;
[self addChild: lblLevelName];

但我得到一个黑色标签,而渐变图像是从黄色到橙色。有什么建议吗?

4

0 回答 0