---
title: "set(pin:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/geometricpinscomponent/set(pin:)"
---

# set(pin:)

Adds a pin to the collection.

## Declaration

```swift
mutating func set(pin: GeometricPin)
```

## Discussion

Discussion If the pin’s name already exists in the collection, the new value replaces the existing one.
