The following code doesn\'t work as expected. According to the SPRITE KIT PROGRAMMING GUIDE, pages 61 and 62 one may perform \"advanced searches\" by using regular expression l
I tried the following variation of your code in both the current and beta versions of Xcode on both iOS and OS-X.
SKScene *scene = [[SKScene alloc] initWithSize:self.gameView.frame.size];
for (int x = 0; x < 20; x++)
{
for (int y = 0; y < 20; y++)
{
CGPathRef myPath = CGPathCreateWithEllipseInRect(CGRectMake(0, 0, 20, 20), NULL);
SKShapeNode *myCircle = [[SKShapeNode alloc] init];
myCircle.path = myPath;
#if TARGET_OS_IPHONE
myCircle.fillColor = [UIColor redColor];
#else
myCircle.fillColor = [NSColor redColor];
#endif
myCircle.name = [NSString stringWithFormat:@"CIRCLE_%d_%d", x, y];
myCircle.position = CGPointMake(20*x,20*y);
[scene addChild:myCircle];
CGPathRelease(myPath);
}
}
[self.gameView presentScene:scene];
All of your sample expressions work on the Mac in both versions of the SDK. On iOS, however, they only worked in the Developer Preview.