# `GSNode toggleConnection:`

*Instance Method*

Toggles the connection type between [`GSNodeConnection.GSNodeConnectionSharp`](/Core/GlyphsCore/GSNode/GSNodeConnection/GSNodeConnectionSharp) and [`GSNodeConnection.GSNodeConnectionSmooth`](/Core/GlyphsCore/GSNode/GSNodeConnection/GSNodeConnectionSmooth).

## Declaration

```swift
func toggleConnection(makeSmooth: Bool)
```

```objc
- (void) toggleConnection:(BOOL) makeSmooth;
```

```python
toggleConnection_(makeSmooth: bool)
```

## Parameters

- `makeSmooth` — Whether to enforce aligned handles in case of a smooth connection.

## See Also

### Connection

- [`GSNode.GSNodeConnection`](/Core/GlyphsCore/GSNode/GSNodeConnection) — The transition of a path through an on-curve node.
- [`GSNode.connection`](/Core/GlyphsCore/GSNode/connection) — The connection between the incoming and outgoing path segments.
- [`GSNode.isSmooth`](/Core/GlyphsCore/GSNode/isSmooth) — Convenience to simplify checking the connection.
- [`GSNode checkConnection`](/Core/GlyphsCore/GSNode/checkConnection) — Automatically sets the connection for the node depending on the angle of the incoming and outgoing path segments.
- [`GSNode toggleConnection:superSmooth:`](/Core/GlyphsCore/GSNode/toggleConnection:superSmooth:) — Toggles the connection type between [`GSNodeConnection.GSNodeConnectionSharp`](/Core/GlyphsCore/GSNode/GSNodeConnection/GSNodeConnectionSharp) and [`GSNodeConnection.GSNodeConnectionSmooth`](/Core/GlyphsCore/GSNode/GSNodeConnection/GSNodeConnectionSmooth)/[`GSNodeConnection.GSNodeConnectionSuperSmooth`](/Core/GlyphsCore/GSNode/GSNodeConnection/GSNodeConnectionSuperSmooth).

