0 votes
149 views
asked in Objective C by (4.2k points)

HI All

   I am using the below code but its throwing the error [SKShapeNode setColor:]: unrecognized selector sent to instance

 NSString *spriteNodeName = [NSString stringWithFormat:@"tile%d",tileCount];

 tileNode[tileCount] = (SKSpriteNode*)[self childNodeWithName:spriteNodeName];

tileNode[20]. color = [SKColor grayColor];

1 Answer

0 votes
answered by
Hi John

   Please could you try the following code

[(SKShapeNode*)tileNode[20] setFillColor:[UIColor grayColor]];

Categories

...