Instance Method

containsPasteboardTypes:inItemSet:

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

Declaration

- (BOOL)containsPasteboardTypes:(NSArray<NSString *> *)pasteboardTypes inItemSet:(NSIndexSet *)itemSet;

Parameters

pasteboardTypes

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

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

YES if the pasteboard items identified by itemSet have data corresponding to the representation types specified by pasteboardTypes; otherwise, returns NO.

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.

- itemSetWithPasteboardTypes:

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