Type Method


Initializes a textured sprite using an image file, optionally adding a normal map to simulate 3D lighting.


+ (instancetype)spriteNodeWithImageNamed:(NSString *)name normalMapped:(BOOL)generateNormalMap;



The name of an image file stored in the app bundle.


If YES, a normal map is generated from the image texture without applying any filter to it (SKTextureNormalMapFilteringTypeNone). If NO, no normal map is generated (matching the behavior of the spriteNodeWithImageNamed: class method).

Return Value

A newly initialized sprite object.


The normal map is used only when lighting is enabled in the scene. For more information, see Lighting a Sprite and SKLightNode.

See Also

Creating a Sprite from an Image Filename

Getting Started with Sprite Nodes

Learn the basics about using images, also known as sprites, with SpriteKit.

- initWithImageNamed:

Initializes a textured sprite using an image file.