Contents

init(texture:)

Initializes a textured sprite using an existing texture object.

Declaration

convenience init(texture: SKTexture?)

Parameters

  • texture:

    A SpriteKit texture.

Return Value

A newly initialized sprite object.

Discussion

The size property of the sprite is set to the dimensions of the texture. The color property is set to white with an alpha of zero (1.0,1.0,1.0,0.0).

See Also

Creating a Sprite from a Texture