Below is the code I'm having trouble with :
SKShapeNode* backgroundRect = [SKShapeNode shapeNodeWithRect:self.frame];
backgroundRect.fillColor = [UIColor whiteColor];
SKAction* colorBackground = [SKAction customActionWithDuration:0.5f actionBlock:^(SKNode *node, CGFloat elapsedTime)
{
backgroundRect.fillColor = [UIColor colorWithRed:1.0f green:0.35f blue:0.35f alpha:1.0f];
NSLog(@"akghajksgaks");
}];
[backgroundRect runAction:colorBackground];
NSLog(@"what");
backgroundRect.lineWidth = 0.0f;
I'm trying to animate changing the fill color of backgroundRect, but the actionBlock of SKAction never seems to be called. The only output I get is "What", so I don't understand how the first NSLog isn't being called. Any help would be greatly appreciated.