Instance Method

dataForPasteboardType:inItemSet:

Returns the data objects in the indicated pasteboard items that have the given representation type.

Declaration

- (NSArray<NSData *> *)dataForPasteboardType:(NSString *)pasteboardType inItemSet:(NSIndexSet *)itemSet;

Parameters

pasteboardType

A string identifying a representation type. Typically this is a UTI.

itemSet

An index set with each integer value identifying a pasteboard item positionally in the pasteboard. Pass in nil to request all pasteboard items.

Return Value

An array of NSData objects or, if a requested pasteboard item has no data of the the type indicated by pasteboardType, a NSNull object.

See Also

Getting and Setting Multiple Pasteboard Items

items

The pasteboard items on the pasteboard.

- valuesForPasteboardType:inItemSet:

Returns the objects in the indicated pasteboard items that have the given representation type.

- addItems:

Appends pasteboard items to the current contents of the pasteboard.

- setItems:options:

Adds an array of items to a pasteboard, and sets privacy options for all the items on the pasteboard.