Type Method

canInitWithPasteboard:

Tests whether the receiver can create an instance of itself using pasteboard data.

Declaration

+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;

Parameters

pasteboard

The pasteboard containing the image data.

Return Value

YES if the receiver knows how to handle the data on the pasteboard; otherwise, NO.

Discussion

This method uses the NSImageRep class method imageUnfilteredPasteboardTypes to find a class that can handle the data in the specified pasteboard. If you create your own NSImageRep subclasses, override the imageUnfilteredPasteboardTypes method to notify NSImage of the pasteboard types your class supports.

See Also

Determining the Supported Image Types

imageTypes

Returns an array of UTI strings identifying the image types supported by the registered NSImageRep objects, either directly or through a user-installed filter service.

imageUnfilteredTypes

Returns an array of UTI strings identifying the image types supported directly by the registered image representation objects.