Structure

NSPasteboard.PasteboardType

No overview available.

Declaration

struct PasteboardType

Topics

Pasteboard Types

static let URL: NSPasteboard.PasteboardType

URL data for one file or resource.

static let fileContents: NSPasteboard.PasteboardType

A representation of a file’s contents.

static let findPanelSearchOptions: NSPasteboard.PasteboardType

Type for NSFindPanel metadata property list. Used with the NSPasteBoard method propertyList(forType:).

static let font: NSPasteboard.PasteboardType

Font and character information.

static let html: NSPasteboard.PasteboardType

HTML (which an NSTextView object can read from, but not write to).

static let postScript: NSPasteboard.PasteboardType

Encapsulated PostScript (EPS) code.

Deprecated
static let ruler: NSPasteboard.PasteboardType

Paragraph formatting information.

static let tabularText: NSPasteboard.PasteboardType

An NSString object containing tab-separated fields of text.

static let textFinderOptions: NSPasteboard.PasteboardType

Type for the Find panel metadata property list.

static let tiff: NSPasteboard.PasteboardType

Tag Image File Format (TIFF) data.

Matching Pasteboard Types to Filename Extensions

static func fileNameType(forPathExtension: String) -> NSPasteboard.PasteboardType!

Returns a pasteboard type based on the passed file type.

static func representedPathExtensions(from: [NSPasteboard.PasteboardType]) -> [String]?

Returns an array of file types based on the passed pasteboard types.

Instance Properties

var representedPathExtension: String?

Returns a file type based on the passed pasteboard type.

Relationships

See Also

Writing Data

func clearContents() -> Int

Clears the existing contents of the pasteboard

func writeObjects([NSPasteboardWriting]) -> Bool

Writes an array of objects to the receiver.

func setData(Data?, forType: NSPasteboard.PasteboardType) -> Bool

Sets the given data as the representation for the specified type for the first item on the receiver.

func setPropertyList(Any, forType: NSPasteboard.PasteboardType) -> Bool

Sets the given property list as the representation for the specified type for the first item on the receiver.

func setString(String, forType: NSPasteboard.PasteboardType) -> Bool

Sets the given string as the representation for the specified type for the first item on the receiver.