Contents

spriteNodeWithColor:size:

Initializes a single-color sprite.

Declaration

+ (instancetype) spriteNodeWithColor:(UIColor *) color size:(CGSize) size;
+ (instancetype) spriteNodeWithColor:(NSColor *) color size:(CGSize) size;

Parameters

  • color:

    The color for the resulting sprite.

  • size:

    The size of the sprite in points.

Return Value

A newly initialized sprite object.

See Also

Creating a Sprite from a Texture