setBatteryLevel(_:forPeripheral:)
Displays the battery level for the specified peripheral.
Declaration
func setBatteryLevel(_ batteryLevel: Double?, forPeripheral peripheral: CBPeripheral)Parameters
- batteryLevel:
A value between 0 and 1.0 indicating the peripheral’s percent battery charge.
- peripheral:
The peripheral corresponding to the battery level being displayed.