SKSpriteNode setting color with UIColor

I would like to set the SKSpriteNode color for the current components. UIColor values. For the existing values ​​of the components of UIColor values, I mean:

(UIColor *)blackColor
(UIColor *)blueColor
etc

The problem is that it does not work:

SKSpriteNode *noddd = [SKSpriteNode spriteNodeWithColor:blackColor size:CGSizeMake(50, 50);

Is there any way to do this?

Thanks in advance;)

+4
source share
1 answer

Use SKColor instead of UIColor.

SKSpriteNode *noddd = [SKSpriteNode spriteNodeWithColor:[SKColor blackColor] size:CGSizeMake(50, 50);
+4
source

Source: https://habr.com/ru/post/1531969/