Class

NSMetadataQueryResultGroup

The NSMetadataQueryResultGroup class represents a collection of grouped attribute results returned by an NSMetadataQuery object.

Topics

Getting Query Results

var attribute: String

The result group’s attribute name.

var value: Any

The result group’s value.

var results: [Any]

An array containing the result group’s result objects.

var resultCount: Int

The number of results returned by the result group.

func result(at: Int)

Returns the query result at a specific index.

var subgroups: [NSMetadataQueryResultGroup]?

An array containing the result group’s subgroups.

Relationships

Inherits From

Conforms To

See Also

Getting Query Results

var results: [Any]

An array containing the query’s results.

var resultCount: Int

The number of results returned by the query. (read-only)

func result(at: Int)

Returns the query result at a specific index.

func index(ofResult: Any)

Returns the index of a query result object in the receiver’s results array.

var groupedResults: [NSMetadataQueryResultGroup]

An array containing hierarchical groups of query results. (read-only)

func enumerateResults((Any, Int, UnsafeMutablePointer<ObjCBool>) -> Void)

Enumerates the current set of results using the given block.

var valueLists: [String : [NSMetadataQueryAttributeValueTuple]]

A dictionary containing the value lists generated by the query.

class NSMetadataQueryAttributeValueTuple

The NSMetadataQueryAttributeValueTuple class represents attribute-value tuples, which are objects that contain the attribute name and value of a metadata attribute.

func value(ofAttribute: String, forResultAt: Int)

Returns the value for the attribute name attrName at the index in the results specified by idx.

func enableUpdates()

Enables updates to the query results.

func disableUpdates()

Disables updates to the query results.

var operationQueue: OperationQueue?

The queue on which query result notifications are posted.