# `GSLayer switchAnchorFastName:withName:`

*Instance Method*

Swaps two anchor names without undo registration or change notifications.

## Declaration

```swift
func switchAnchorFastName(_ name1: String, withName name2: String)
```

```objc
- (void) switchAnchorFastName:(NSString *) name1 withName:(NSString *) name2;
```

```python
switchAnchorFastName_withName_(name1: str, name2: str)
```

## Discussion

If only one anchor exists, that anchor is renamed.

## See Also

### Anchors

- [`GSLayer.anchors`](/Core/GlyphsCore/GSLayer/anchors) — Layer anchors keyed by anchor name.
- [`GSLayer countOfAnchors`](/Core/GlyphsCore/GSLayer/countOfAnchors) — The number of anchors on the layer.
- [`GSLayer addAnchor:`](/Core/GlyphsCore/GSLayer/addAnchor:) — Adds or replaces an anchor by name.
- [`GSLayer setAnchorArray:`](/Core/GlyphsCore/GSLayer/setAnchorArray:) — Replaces all anchors with anchors from an array.
- [`GSLayer setAnchorArrayFast:`](/Core/GlyphsCore/GSLayer/setAnchorArrayFast:) — Replaces all anchors without undo registration or change notifications.
- [`GSLayer removeAnchor:`](/Core/GlyphsCore/GSLayer/removeAnchor:) — Removes an anchor from the layer.
- [`GSLayer removeAnchorWithName:`](/Core/GlyphsCore/GSLayer/removeAnchorWithName:) — Removes the anchor with a name.
- [`GSLayer anchorChangedName:`](/Core/GlyphsCore/GSLayer/anchorChangedName:) — Updates layer anchor lookup after an owned anchor changes its name.

