Structure

NSPasteboard.ReadingOptions

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

Declaration

struct ReadingOptions

Overview

You can specify only one option from this list. If you do not specify an option, the default asData is used.

Topics

Options

static var asData: NSPasteboard.ReadingOptions

An option to read data from the pasteboard as-is and return it as a data object.

static var asString: NSPasteboard.ReadingOptions

An option to read data from the pasteboard and convert it to a string object.

static var asPropertyList: NSPasteboard.ReadingOptions

An option to read data from the pasteboard and un-serialize it as a property list.

static var asKeyedArchive: NSPasteboard.ReadingOptions

An option to read data from the pasteboard and use it to initialize the object.

Relationships

Conforms To

See Also

Reading Data

func readObjects(forClasses: [AnyClass], options: [NSPasteboard.ReadingOptionKey : Any]?) -> [Any]?

Reads from the receiver objects that best match the specified array of classes.

struct NSPasteboard.ReadingOptionKey

Options for reading pasteboard data.

var pasteboardItems: [NSPasteboardItem]?

An array that contains all the items held by the pasteboard.

func index(of: NSPasteboardItem) -> Int

Returns the index of the specified pasteboard item.

func data(forType: NSPasteboard.PasteboardType) -> Data?

Returns the data for the specified type from the first item in the receiver that contains the type.

func propertyList(forType: NSPasteboard.PasteboardType) -> Any?

Returns the property list for the specified type from the first item in the receiver that contains the type.

func string(forType: NSPasteboard.PasteboardType) -> String?

Returns a concatenation of the strings for the specified type from all the items in the receiver that contain the type.