Instance Method

valueForAttributeNamed:

The value of a shader attribute.

Declaration

- (SKAttributeValue *)valueForAttributeNamed:(NSString *)key;

Parameters

key

The attribute name.

Return Value

An attribute value object containing the scalar or vector value or nil if no such attribute exists.

See Also

Customizing Stroking or Fill Drawing

Controlling Shape Drawing with Shaders

Change a shape node's appearance by supplying custom shader code.

strokeShader

A custom shader used to determine the color of the stroked portion of the shape node.

fillShader

A custom shader used to determine the color of the filled portion of the shape node.

attributeValues

The values of each attribute associated with the node's attached shader.

- setValue:forAttributeNamed:

Sets an attribute value for an attached shader.