Type Method


Returns options for reading data of a specified type from a given pasteboard.


optional static func readingOptions(forType type: NSPasteboard.PasteboardType, pasteboard: NSPasteboard) -> NSPasteboard.ReadingOptions



A UTI supported by instances of the receiver for reading (one of the types returned by readableTypes(for:)).


A pasteboard.

You can use the pasteboard argument to provide return different based on the pasteboard name, should you need to do so.

Return Value

Options for reading data of type from pasteboard. For a list of valid values, see NSPasteboard.ReadingOptions.


Do not perform other pasteboard operations in this method implementation.

See Also

Reading From the Pasteboard

static func readableTypes(for: NSPasteboard) -> [NSPasteboard.PasteboardType]

Returns an array of UTI strings of data types the receiver can read from the pasteboard and be initialized from.


struct NSPasteboard.ReadingOptions

Options to specify how data on the pasteboard should be interpreted to initialize pasteboard data.