Modifica

Condividi tramite


UIDeviceBatteryState Enum

Definition

An enumeration of values indicating the state of the battery.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIDeviceBatteryState
type UIDeviceBatteryState = 
Inheritance
UIDeviceBatteryState
Attributes

Fields

Name Value Description
Unknown 0

Can not determine the state of the battery.

Unplugged 1

The device is unplugged.

Charging 2

The device's battery is currently charging.

Full 3

The device's battery is at full capacity.

Remarks

This is a qualitative description of the battery state (e.g., Charging). For a quantitative view of battery charge level, use BatteryLevel.

Applies to