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 moreDeclaration
Swift
public enum Event -
Initializes a new
ProcessInfoPowerStateMonitor.Declaration
Swift
public init(queue: OperationQueue = .main, handler: @escaping (Event) -> Void)Parameters
queueThe operation queue on which the handler executes. By default, the main operation queue is used.
handlerThe 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()
View on GitHub
Install in Dash
ProcessInfoPowerStateMonitor Class Reference