ProcessInfoPowerStateMonitor

public class ProcessInfoPowerStateMonitor : BaseNotificationMonitor

A ProcessInfoPowerStateMonitor instance monitors the device for changes to its power state (Low Power Mode is enabled or disabled).

  • Encapsulates changes to the power state of the device.

    See more

    Declaration

    Swift

    public enum Event
  • Initializes a new ProcessInfoPowerStateMonitor.

    Declaration

    Swift

    public init(queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    Parameters

    queue

    The operation queue on which the handler executes. By default, the main operation queue is used.

    handler

    The handler to call when the power state of the device changes.

  • A Boolean value indicating whether Lower Power Mode is enabled on the device.

    Declaration

    Swift

    public var state: Bool { get }
  • Declaration

    Swift

    override public func addNotificationObservers()