Instance Method

metadataQuery(_:replacementValueForAttribute:value:)

Returns a different value for a given attribute and value.

Declaration

optional func metadataQuery(_ query: NSMetadataQuery, replacementValueForAttribute attrName: String, value attrValue: Any) -> Any

Parameters

query

The query that produced the result object with attribute.

attribute

The attribute in question.

attributeValue

The attribute value to replace.

Return Value

Object that replaces the value of attribute in the result object

Discussion

The delegate implementation of this method could convert specific query attribute values to other attribute values, for example, converting date object values to formatted strings for display.

See Also

Getting Query Results

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software