Enumeration

UIDevice.BatteryState

The battery power state of the device.

Overview

These constants are used by the batteryState property.

Topics

Constants

case unknown

The battery state for the device cannot be determined.

case unplugged

The device is not plugged into power; the battery is discharging.

case charging

The device is plugged into power and the battery is less than 100% charged.

case full

The device is plugged into power and the battery is 100% charged.

See Also

Getting the Device Battery State

var batteryLevel: Float

The battery charge level for the device.

var isBatteryMonitoringEnabled: Bool

A Boolean value indicating whether battery monitoring is enabled (true) or not (false).

var batteryState: UIDevice.BatteryState

The battery state for the device.