WindowMonitor

public class WindowMonitor : BaseNotificationMonitor

A WindowMonitor instance monitors a window for changes to its visibility or its key status.

  • Encapsulates changes to the visibility and key status of the window.

    See more

    Declaration

    Swift

    public enum Event
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options : OptionSet
  • Initializes a new WindowMonitor.

    Declaration

    Swift

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

    Parameters

    window

    The window to monitor.

    options

    The options that specify which events to monitor. By default, all events are monitored.

    queue

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

    handler

    The handler to call when the visibility or the key status of the window changes.

  • The window being monitored.

    Declaration

    Swift

    public let window: UIWindow
  • Declaration

    Swift

    override public func addNotificationObservers()