---
title: "setIcon(_:forPeripheral:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothconnectionview/3029515-seticon
---

# setIcon(_:forPeripheral:)

Displays an icon representing the specified peripheral.

## Declaration

```swift
func setIcon(_ icon: UIImage, forPeripheral peripheral: CBPeripheral)
```

## Parameters

- `icon`: An icon that represents the specified peripheral.
- `peripheral`: The peripheral corresponding to the icon being displayed.

## See Also

### Displaying Individual Details

- [setBatteryLevel(_:forPeripheral:)](playgroundbluetooth/playgroundbluetoothconnectionview/3029513-setbatterylevel.md)
- [setFirmwareStatus(_:forPeripheral:)](playgroundbluetooth/playgroundbluetoothconnectionview/3029514-setfirmwarestatus.md)
- [setIssueIcon(_:forPeripheral:)](playgroundbluetooth/playgroundbluetoothconnectionview/3029516-setissueicon.md)
- [setName(_:forPeripheral:)](playgroundbluetooth/playgroundbluetoothconnectionview/3029518-setname.md)
