Type Property

UIDeviceBatteryStateDidChange

Posted when battery state changes.

Declaration

static let UIDeviceBatteryStateDidChange: NSNotification.Name

Discussion

For this notification to be sent, you must set the isBatteryMonitoringEnabled property to true.

You can obtain the battery state by getting the value of the batteryState property.

See Also

Notifications

static let UIDeviceOrientationDidChange: NSNotification.Name

Posted when the orientation of the device changes.

static let UIDeviceProximityStateDidChange: NSNotification.Name

Posted when the state of the proximity sensor changes.