PasteboardMonitor
public class PasteboardMonitor : BaseNotificationMonitor
A PasteboardMonitor instance monitors a pasteboard for changes to its
contents or for its removal from the app.
-
Encapsulates information associated with a pasteboard monitor
See morechangedevent.Declaration
Swift
public struct Changes -
Encapsulates changes to the pasteboard and its contents.
See moreDeclaration
Swift
public enum Event -
Specifies which events to monitor.
See moreDeclaration
Swift
public struct Options : OptionSet -
Initializes a new
PasteboardMonitor.Declaration
Swift
public init(pasteboard: UIPasteboard, options: Options = .all, queue: OperationQueue = .main, handler: @escaping(Event) -> Void)Parameters
pasteboardThe pasteboard to monitor.
optionsThe options that specify which events to monitor. By default all events are monitored
queueThe operation queue on which the handler executes. By default, the main operation queue is used.
handlerThe handler to call when the pasteboard is removed from the app, or its contents change.
-
The pasteboard being monitored.
Declaration
Swift
public let pasteboard: UIPasteboard -
Declaration
Swift
override public func addNotificationObservers()
View on GitHub
Install in Dash
PasteboardMonitor Class Reference