Instance Method

itemSetWithPasteboardTypes:

Returns an index set identifying pasteboard items having the specified representation types.

Declaration

- (NSIndexSet *)itemSetWithPasteboardTypes:(NSArray<NSString *> *)pasteboardTypes;

Parameters

pasteboardTypes

An array of strings, with each string identifying a representation type. Typically you use UTIs as pasteboard types.

Return Value

An index set with each integer positionally identifying a pasteboard item that has one of the representation types specified in pasteboardTypes.

Discussion

You can pass the index set returned in this method in a call to dataForPasteboardType:inItemSet: or valuesForPasteboardType:inItemSet: to get the data in the indicated pasteboard items.

See Also

Determining the Types of Multiple Pasteboard Items

numberOfItems

Returns the number of items in the pasteboard

- pasteboardTypesForItemSet:

Returns an array of representation types for each specified pasteboard item.

- containsPasteboardTypes:inItemSet:

Returns whether the specified pasteboard items contain data of the given representation types.