Prepares the receiver for a change in its contents by declaring the new types of data it will contain and a new owner.
- macOS 10.0+
An array of
NSStringobjects that specify the types of data that may be added to the new 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).
The object responsible for writing data to the pasteboard, or
nilif you provide data for all types immediately. If you specify a
newobject, it must support all of the types declared in the
newparameter and must remain alive for as long as the data is promised on the pasteboard.
The receiver's new change count.
In general, you should not use this method with
write will always write additional items to the pasteboard, and will not affect items already on the pasteboard, including the item implicitly created by this method.