One Logo Pool Ball
SpriteKit · IOS API REFERENCE

SKShader

class · iOS 8.0+ · SDK 27.1

class SKShader

Members (12)

init · iOS 8.0+

init

TypeScript
static initFileNamed(name: string): SKShader
Swift declaration
convenience init(fileNamed name: String)
method · iOS 8.0+

addUniform

TypeScript
addUniform(uniform: SKUniform): void
Swift declaration
func addUniform(_ uniform: SKUniform)
init · iOS 8.0+

init

TypeScript
static initSource(source: string): SKShader
Swift declaration
init(source: String)
init · iOS 8.0+

init

TypeScript
static initSourceUniforms(source: string, uniforms: Array<SKUniform>): SKShader
Swift declaration
init(source: String, uniforms: [SKUniform])
method · iOS 8.0+

removeUniformNamed

TypeScript
removeUniformNamed(name: string): void
Swift declaration
func removeUniformNamed(_ name: String)
method · iOS 8.0+

uniformNamed

TypeScript
uniformNamed(name: string): (SKUniform) | null
Swift declaration
func uniformNamed(_ name: String) -> SKUniform?
get · iOS 9.0+

attributes

TypeScript
get attributes(): Array<SKAttribute>
Swift declaration
var attributes: [SKAttribute] { get set }
set · iOS 9.0+

attributes

TypeScript
set attributes(value: Array<SKAttribute>)
Swift declaration
var attributes: [SKAttribute] { get set }
get · iOS 8.0+

source

TypeScript
get source(): (string) | null
Swift declaration
var source: String? { get set }
set · iOS 8.0+

source

TypeScript
set source(value: (string) | null)
Swift declaration
var source: String? { get set }
get · iOS 8.0+

uniforms

TypeScript
get uniforms(): Array<SKUniform>
Swift declaration
var uniforms: [SKUniform] { get set }
set · iOS 8.0+

uniforms

TypeScript
set uniforms(value: Array<SKUniform>)
Swift declaration
var uniforms: [SKUniform] { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SKShader.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All SpriteKit types →