Contents

propertyList(forType:)

Returns the property list for the specified type from the first item in the receiver that contains the type.

Declaration

func propertyList(forType dataType: NSPasteboard.PasteboardType) -> Any?

Parameters

  • dataType:

    The pasteboard data type containing the property-list data.

Return Value

A property list of objects of the specified type, obtained from the first item in the receiver that contains the type. The returned property list can contain any combination of objects, as long as each object is a valid property-list type (for a list of types, see Property list).

Discussion

This method invokes the data(forType:) method.

Special Considerations

It’s a good idea to check types or call availableType(from:) before invoking propertyList(forType:). Although performing this check isn’t required, doing so can help you determine if a nil result from a reading method is due to something like a pasteboard timeout.

See Also

Related Documentation

Reading data