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 morechanged
event.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
pasteboard
The pasteboard 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 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()