Contents

types

An array of the receiver’s supported data types.

Declaration

var types: [NSPasteboard.PasteboardType]? { get }

Discussion

The types array is an array of NSString objects containing the union of the types of data declared for all the pasteboard items on the receiver. The returned types are listed in the order they were declared. It’s a good idea to check the value of types (or call availableType(from:)) before reading any data from an NSPasteboard object. If you need to see if a type in the types array matches a type string you have stored locally, use the isEqual(to:) method to perform the comparison.

See Also

Related Documentation

Validating contents