---
title: "connectionView(_:willDisconnectFrom:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothconnectionviewdelegate/3029528-connectionview
---

# connectionView(_:willDisconnectFrom:)

Tells the delegate that a connected peripheral is about to be disconnected.

## Declaration

```swift
func connectionView(_ connectionView: PlaygroundBluetoothConnectionView, willDisconnectFrom peripheral: CBPeripheral)
```

## Parameters

- `connectionView`: The connection view currently displaying the connection to this peripheral.
- `peripheral`: The peripheral facing emminent disconnection.
