readSelection(from:type:)
Reads data of the given type from the specified pasteboard.
Declaration
func readSelection(from pboard: NSPasteboard, type: NSPasteboard.PasteboardType) -> BoolParameters
- pboard:
The pasteboard to read from.
- type:
The type of data to read.
Return Value
Discussion
The new data is placed at the current insertion point, replacing the current selection if one exists.
You should override this method to read pasteboard types other than the default types. Use the rangeForUserTextChange method to obtain the range of characters (if any) to be replaced by the new data.