Xcode 7 , texture, generateTexture, null. , - , .
NSLog . . generateTexture:
NSLog(@"texture: %@", texture);
:
texture: '(null)' (300 x 300)
s1 dict1 :
s1: name: '(null)' texture: ['(null)' (300 x 300)]: {100, 100}: {1.00, 1.00} : {100, 100} : {0.5, 0.5} : 0.00
dict1: { object = "'(null)' (300 x 300)"; }
iOS 8, iOS 9, , , .
, SKShapeNode scene, scene. SKShapeNode, .
shapeNode.fillTexture = [SKTexture textureWithImageNamed:@"Spaceship"];
SKTexture *texture = shapeNode.fillTexture;
return texture;
Update:
, textureFromNode , , iOS 9. , , , . , , . , , , .
, SKLabelNode SKSpriteNode didMoveToView. , , snapshot, . .
- (UIImage *)snapshot
{
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 0.5);
[self.view drawViewHierarchyInRect:self.view.bounds afterScreenUpdates:YES];
UIImage *snapshotImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return snapshotImage;
}
UIImage, . iOS 8, 9.