Contents

positionY(_:)

Creates a constraint that restricts the y-coordinate of a node’s position.

Declaration

class func positionY(_ range: SKRange) -> Self

Parameters

  • range:

    The range to restrict the coordinate to.

Mentioned in

Return Value

A new constraint.

Discussion

Each time when constraints are applied, the y-coordinate of the node’s position property is clamped so that it lies inside the specified range.

See Also

Creating Position Constraints