SKLableNode: uso de la imagen como patrón de color

I want to create a label node using gradient. There is a way to do it outside of sprite kit, with UILabel for example:

UIImage *image = [UIImage imageNamed:@"Image.png"];
label.textColor = [UIColor colorWithPatternImage:image]; 

...but its not working with label nodes (text becomes invisible, no errors tho). I also tried using SKColor instead of UIColor.

Any idea why its not working? Or if there is a different way to achieve gradient text in sprite kit?

preguntado el 15 de febrero de 14 a las 20:02

1 Respuestas

Sprite Kit doesn't do pattern colors. You can, however, use a label node to mask out an area of another sprite's image using SKCropNode.

Respondido 15 Feb 14, 21:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.