Instance Method

initWithPasteboardPropertyList:ofType:

Initializes an instance with a property list object and a type string.

Declaration

- (id)initWithPasteboardPropertyList:(id)propertyList ofType:(NSPasteboardType)type;

Parameters

propertyList

A property list containing data to initialize the receiver.

By default, the property list object is an instance of NSData. If you implement readingOptionsForType:pasteboard: and specify an option other than NSPasteboardReadingAsData, the propertyList may be any other property list object.

type

A UTI supported by the receiver for reading (one of the types returned by readableTypesForPasteboard:).

Return Value

An object initialized using the data in propertyList.

Discussion

This method is considered optional because, if readableTypesForPasteboard: returns just a single type, and that type uses the NSPasteboardReadingAsKeyedArchive reading option, then instances are initialized using initWithCoder: instead of this method.