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(options: Options = .all,
                queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    Parameters

    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 of the keyboard or the frame of the keyboard changes or is about to change.

  • Declaration

    Swift

    override public func addNotificationObservers()