Instance Property

batteryState

The battery state for the device.

Declaration

var batteryState: UIDeviceBatteryState { get }

Discussion

The value for batteryState is one of the constants in UIDeviceBatteryState.

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

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).