Contents

named(_:)

Creates a named coordinate space using the given value.

Declaration

static func named(_ name: some Hashable) -> NamedCoordinateSpace

Parameters

  • name:

    A unique value that identifies the coordinate space.

Return Value

A named coordinate space identified by the given value.

Discussion

Use the coordinateSpace(_:) modifier to assign a name to the local coordinate space of a parent view. Child views can then refer to that coordinate space using .named(_:).

See Also

Getting built-in coordinate spaces