Instance Property

frame

A rectangle in the parent’s coordinate system that contains the node’s content, ignoring the node’s children.

Declaration

var frame: CGRect { get }

Discussion

The frame is the smallest rectangle that contains the node’s content, taking into account the node’s xScale, yScale, and zRotation properties. Not all nodes contain content of their own.

See Also

Inspecting the Node’s Position

func calculateAccumulatedFrame()

Calculates a rectangle in the parent’s coordinate system that contains the content of the node and all of its descendants.

var position: CGPoint

The position of the node in its parent's coordinate system.

var zPosition: CGFloat

The height of the node relative to its parent.