Adds promises for the specified types to the first pasteboard item.
- macOS 10.0+
An array of
NSStringobjects, each of which specifies a type of data that can be provided to the pasteboard.
The object that provides the data for the specified types.
If the data for those types is provided immediately, the owner can be
nil. If the data for the added types will be provided lazily when requested from the pasteboard, an owner object must be provided that implements the -
pasteboard:method of the NSPasteboardOwner informal protocol.
provide Data For Type:
The new change count, or
0 if there was an error adding the types.
This method adds promises for the specified types to the first pasteboard item.
You use this methods to declare additional types of data for the first pasteboard item in the receiver. You can also use it to replace existing types added by a previous
new parameter specifies the types of data you are promising to the pasteboard. The types should be ordered according to the preference of the source application, with the most preferred type coming first (typically, the richest representation). New types are added to the end of the list containing any existing types, if any.
If you specify a type that has already been declared, this method replaces the owner of that type with the value in
new. In addition, any data already written to the pasteboard for that type is removed.