ScreenBrightnessMonitor

public class ScreenBrightnessMonitor : BaseNotificationMonitor

A ScreenBrightnessMonitor instance monitors a screen for changes to its brightness level.

  • Encapsulates changes to the brightness level of the screen.

    See more

    Declaration

    Swift

    public enum Event
  • Initializes a new ScreenBrightnessMonitor.

    Declaration

    Swift

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

    Parameters

    screen

    The screen to monitor.

    queue

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

    handler

    The handler to call when the brightness level of the screen changes.

  • The screen being monitored.

    Declaration

    Swift

    public let screen: UIScreen
  • Declaration

    Swift

    override public func addNotificationObservers()