Global Variable

UIDeviceBatteryLevelDidChangeNotification

Posted when the battery level changes.

Declaration

const NSNotificationName UIDeviceBatteryLevelDidChangeNotification;

Discussion

For this notification to be sent, you must set the batteryMonitoringEnabled property to YES.

Notifications for battery level change are sent no more frequently than once per minute. Do not attempt to calculate battery drainage rate or battery time remaining; drainage rate can change frequently depending on built-in applications as well as your application.

You can obtain the battery level by getting the value of the batteryLevel property.

See Also

Notifications

UIDeviceBatteryStateDidChangeNotification

Posted when battery state changes.

UIDeviceOrientationDidChangeNotification

Posted when the orientation of the device changes.

UIDeviceProximityStateDidChangeNotification

Posted when the state of the proximity sensor changes.