Instance Method

canReadObjectForClasses:options:

Returns a Boolean value that indicates whether the receiver contains any items that can be represented as an instance of any class in a given array.

Declaration

- (BOOL)canReadObjectForClasses:(NSArray<Class> *)classArray options:(NSDictionary<NSPasteboardReadingOptionKey, id> *)options;

Parameters

classArray

An array of class objects.

Classes in the array must conform to the NSPasteboardReading protocol.

options

A dictionary that specifies options to refine the search for pasteboard items, for example to restrict the search to file URLs with particular content types. For valid dictionary keys, see Pasteboard Reading Options.

Return Value

YES if the receiver contains any items that can be represented as an instance of a class specified in classArray, otherwise NO.

See Also

Validating Contents

- availableTypeFromArray:

Scans the specified types for a type that the receiver supports.

- canReadItemWithDataConformingToTypes:

Returns a Boolean value that indicates whether the receiver contains any items that conform to the specified UTIs.

types

An array of the receiver’s supported data types.

+ typesFilterableTo:

Returns the data types that can be converted to the specified type using the available filter services.