BatteryState

@objc
public enum BatteryState : Int, CustomStringConvertible
  • The device is plugged into power and the battery is charging

    Declaration

    Swift

    case charging
  • The device is unplugged and running on battery power

    Declaration

    Swift

    case discharging
  • The device is plugged into power and the battery is fully charged

    Declaration

    Swift

    case full
  • The battery state cannot be determined (battery monitoring may be disabled)

    Declaration

    Swift

    case unknown
  • Declaration

    Swift

    public init(from batteryState: UIDevice.BatteryState)
  • Declaration

    Swift

    public var description: String { get }