ScreenConnectionMonitor

public class ScreenConnectionMonitor : BaseNotificationMonitor

A ScreenConnectionMonitor instance monitors the device for screen connections and disconnections.

  • Encapsulates screen connections to or screen disconnections from the device.

    See more

    Declaration

    Swift

    public enum Event
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options : OptionSet
  • Initializes a new ScreenConnectionMonitor.

    Declaration

    Swift

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

    Parameters

    options

    The options that specify which events 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 a screen is connected to or disconnected from the device.

  • Declaration

    Swift

    public override func addNotificationObservers()