UndoManagerMonitor

public class UndoManagerMonitor : BaseNotificationMonitor

An UndoManagerMonitor instance monitors an undo manager for changes to its recording of operations.

  • Encapsulates changes to the undo manager.

    See more

    Declaration

    Swift

    public enum Event
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options : OptionSet
  • Initializes a new UndoManagerMonitor.

    Declaration

    Swift

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

    Parameters

    undoManager

    The undo manager 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 there is a change to the undo manager’s recording of operations.

  • The undo manager being monitored.

    Declaration

    Swift

    public let undoManager: UndoManager
  • Declaration

    Swift

    override public func addNotificationObservers()