Contents

batteryState

The battery state for the device.

Declaration

var batteryState: UIDevice.BatteryState { get }

Discussion

The value for batteryState is one of the constants in UIDevice.BatteryState.

If battery monitoring is not enabled, the value of this property is UIDevice.BatteryState.unknown.

See Also

Getting the device battery state