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