One Logo Pool Ball
SpriteKit · IOS API REFERENCE

SKShapeNode

class · SDK 27.1

class SKShapeNode

Members (45)

init · iOS 8.0+

init

TypeScript
static initCircleOfRadius(radius: number): Promise<SKShapeNode>
Swift declaration
convenience init(circleOfRadius radius: CGFloat)
init · iOS 8.0+

init

TypeScript
static initEllipseIn(rect: { x: number; y: number; width: number; height: number }): Promise<SKShapeNode>
Swift declaration
convenience init(ellipseIn rect: CGRect)
init · iOS 8.0+

init

TypeScript
static initEllipseOf(size: { width: number; height: number }): Promise<SKShapeNode>
Swift declaration
convenience init(ellipseOf size: CGSize)
init · iOS 8.0+

init

TypeScript
static initPath(path: _CoreGraphics_CGPath): Promise<SKShapeNode>
Swift declaration
convenience init(path: CGPath)
init · iOS 8.0+

init

TypeScript
static initPathCentered(path: _CoreGraphics_CGPath, centered: boolean): Promise<SKShapeNode>
Swift declaration
convenience init(path: CGPath, centered: Bool)
init · iOS 8.0+

init

TypeScript
static initPointsCount(points: "animatableData" | SDKHandle, numPoints: number): Promise<SKShapeNode>
Swift declaration
convenience init(points: UnsafeMutablePointer<CGPoint>, count numPoints: Int)
init · iOS 8.0+

init

TypeScript
static initRect(rect: { x: number; y: number; width: number; height: number }): Promise<SKShapeNode>
Swift declaration
convenience init(rect: CGRect)
init · iOS 8.0+

init

TypeScript
static initRectCornerRadius(rect: { x: number; y: number; width: number; height: number }, cornerRadius: number): Promise<SKShapeNode>
Swift declaration
convenience init(rect: CGRect, cornerRadius: CGFloat)
init · iOS 8.0+

init

TypeScript
static initRectOf(size: { width: number; height: number }): Promise<SKShapeNode>
Swift declaration
convenience init(rectOf size: CGSize)
init · iOS 8.0+

init

TypeScript
static initRectOfCornerRadius(size: { width: number; height: number }, cornerRadius: number): Promise<SKShapeNode>
Swift declaration
convenience init(rectOf size: CGSize, cornerRadius: CGFloat)
init · iOS 8.0+

init

TypeScript
static initSplinePointsCount(points: "animatableData" | SDKHandle, numPoints: number): Promise<SKShapeNode>
Swift declaration
convenience init(splinePoints points: UnsafeMutablePointer<CGPoint>, count numPoints: Int)
method · iOS 10.0+

setValue

TypeScript
setValue(value: SKAttributeValue, key: string): Promise<void>
Swift declaration
func setValue(_ value: SKAttributeValue, forAttribute key: String)
method · iOS 10.0+

value

TypeScript
value(key: string): Promise<(SKAttributeValue) | null>
Swift declaration
func value(forAttributeNamed key: String) -> SKAttributeValue?
get

isAntialiased

TypeScript
get isAntialiased(): Promise<boolean>
Swift declaration
var isAntialiased: Bool { get set }
set

isAntialiased

TypeScript
setIsAntialiased(value: boolean): Promise<void>
Swift declaration
var isAntialiased: Bool { get set }
get · iOS 10.0+

attributeValues

TypeScript
get attributeValues(): Promise<Record<string, SKAttributeValue>>
Swift declaration
var attributeValues: [String : SKAttributeValue] { get set }
set · iOS 10.0+

attributeValues

TypeScript
setAttributeValues(value: Record<string, SKAttributeValue>): Promise<void>
Swift declaration
var attributeValues: [String : SKAttributeValue] { get set }
get

blendMode

TypeScript
get blendMode(): Promise<SKBlendMode>
Swift declaration
var blendMode: SKBlendMode { get set }
set

blendMode

TypeScript
setBlendMode(value: SKBlendMode): Promise<void>
Swift declaration
var blendMode: SKBlendMode { get set }
get

fillColor

TypeScript
get fillColor(): Promise<_UIKit_UIColor>
Swift declaration
var fillColor: UIColor { get set }
set

fillColor

TypeScript
setFillColor(value: _UIKit_UIColor): Promise<void>
Swift declaration
var fillColor: UIColor { get set }
get · iOS 8.0+

fillShader

TypeScript
get fillShader(): Promise<(SKShader) | null>
Swift declaration
var fillShader: SKShader? { get set }
set · iOS 8.0+

fillShader

TypeScript
setFillShader(value?: (SKShader) | null): Promise<void>
Swift declaration
var fillShader: SKShader? { get set }
get · iOS 8.0+

fillTexture

TypeScript
get fillTexture(): Promise<(SKTexture) | null>
Swift declaration
var fillTexture: SKTexture? { get set }
set · iOS 8.0+

fillTexture

TypeScript
setFillTexture(value?: (SKTexture) | null): Promise<void>
Swift declaration
var fillTexture: SKTexture? { get set }
get

glowWidth

TypeScript
get glowWidth(): Promise<number>
Swift declaration
var glowWidth: CGFloat { get set }
set

glowWidth

TypeScript
setGlowWidth(value: number): Promise<void>
Swift declaration
var glowWidth: CGFloat { get set }
get

lineCap

TypeScript
get lineCap(): Promise<_CoreGraphics_CGLineCap>
Swift declaration
var lineCap: CGLineCap { get set }
set

lineCap

TypeScript
setLineCap(value: _CoreGraphics_CGLineCap): Promise<void>
Swift declaration
var lineCap: CGLineCap { get set }
get

lineJoin

TypeScript
get lineJoin(): Promise<_CoreGraphics_CGLineJoin>
Swift declaration
var lineJoin: CGLineJoin { get set }
set

lineJoin

TypeScript
setLineJoin(value: _CoreGraphics_CGLineJoin): Promise<void>
Swift declaration
var lineJoin: CGLineJoin { get set }
get

lineLength

TypeScript
get lineLength(): Promise<number>
Swift declaration
var lineLength: CGFloat { get }
get

lineWidth

TypeScript
get lineWidth(): Promise<number>
Swift declaration
var lineWidth: CGFloat { get set }
set

lineWidth

TypeScript
setLineWidth(value: number): Promise<void>
Swift declaration
var lineWidth: CGFloat { get set }
get

miterLimit

TypeScript
get miterLimit(): Promise<number>
Swift declaration
var miterLimit: CGFloat { get set }
set

miterLimit

TypeScript
setMiterLimit(value: number): Promise<void>
Swift declaration
var miterLimit: CGFloat { get set }
get

path

TypeScript
get path(): Promise<(_CoreGraphics_CGPath) | null>
Swift declaration
var path: CGPath? { get set }
set

path

TypeScript
setPath(value?: (_CoreGraphics_CGPath) | null): Promise<void>
Swift declaration
var path: CGPath? { get set }
get

strokeColor

TypeScript
get strokeColor(): Promise<_UIKit_UIColor>
Swift declaration
var strokeColor: UIColor { get set }
set

strokeColor

TypeScript
setStrokeColor(value: _UIKit_UIColor): Promise<void>
Swift declaration
var strokeColor: UIColor { get set }
get · iOS 8.0+

strokeShader

TypeScript
get strokeShader(): Promise<(SKShader) | null>
Swift declaration
var strokeShader: SKShader? { get set }
set · iOS 8.0+

strokeShader

TypeScript
setStrokeShader(value?: (SKShader) | null): Promise<void>
Swift declaration
var strokeShader: SKShader? { get set }
get · iOS 8.0+

strokeTexture

TypeScript
get strokeTexture(): Promise<(SKTexture) | null>
Swift declaration
var strokeTexture: SKTexture? { get set }
set · iOS 8.0+

strokeTexture

TypeScript
setStrokeTexture(value?: (SKTexture) | null): Promise<void>
Swift declaration
var strokeTexture: SKTexture? { get set }
get

customPlaygroundQuickLook

TypeScript
get customPlaygroundQuickLook(): Promise<SDKHandle>
Swift declaration
@MainActor @preconcurrency var customPlaygroundQuickLook: PlaygroundQuickLook { get }

A custom playground Quick Look for this instance. If this type has value semantics, the `PlaygroundQuickLook` instance should be unaffected by subsequent mutations.

Skipped declarations

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

SKShapeNode.init()

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

All SpriteKit types →