KeyboardMonitor

public class KeyboardMonitor: BaseNotificationMonitor

A KeyboardMonitor instance monitors the keyboard for changes to its visibility or to its frame.

  • Encapsulates changes to the visibility of the keyboard and to the frame of the keyboard.

    See more

    Declaration

    Swift

    public enum Event
  • Encapsulates information associated with a keyboard monitor event.

    See more

    Declaration

    Swift

    public struct Info
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options: OptionSet
  • Initializes a new KeyboardMonitor.

    Declaration

    Swift

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

    Parameters

    queue

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

    options

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

    handler

    The handler to call when the visibility of the keyboard or the frame of the keyboard changes or is about to change.

  • Declaration

    Swift

    public override func addNotificationObservers()