result(at:)
Returns the query result at a specific index.
Declaration
func result(at idx: Int) -> AnyParameters
- idx:
The index of the desired result in the query result array.
Return Value
The query result at the position specified by idx. By default, this method returns an NSMetadataItem object representing the requested result; however, the query’s delegate can substitute this object with an instance of a different class.
Discussion
For performance reasons, use this method when retrieving a specific result, rather than the array returned by results.