Instance Property

batteryLevel

The battery charge level for the device.

Declaration

@property(nonatomic, readonly) float batteryLevel;

Discussion

Battery level ranges from 0.0 (fully discharged) to 1.0 (100% charged). Before accessing this property, ensure that battery monitoring is enabled.

If battery monitoring is not enabled, battery state is UIDeviceBatteryStateUnknown and the value of this property is –1.0.

See Also

Getting the Device Battery State

batteryMonitoringEnabled

A Boolean value indicating whether battery monitoring is enabled (YES) or not (NO).

batteryState

The battery state for the device.

UIDeviceBatteryState

The battery power state of the device.