Class

CKLocationSortDescriptor

An object used to sort records containing location data.

Declaration

class CKLocationSortDescriptor : NSSortDescriptor

Overview

You can add a location sort descriptor to your queries when searching for records. At creation time, you must provide the sort descriptor with a key whose value is a CLLocation object. The sort descriptor uses the value of that key to perform the sort.

Distances are computed by drawing a direct line between the two locations that follows the curvature of the Earth. Distances do not take into account altitude changes between the two locations.

Topics

Initializing a Location Sort Descriptor

init(key: String, relativeLocation: CLLocation)

Initializes and returns a location sort descriptor object.

Accessing the Location Value

var relativeLocation: CLLocation

The reference location against which records are sorted.

Relationships

Inherits From

See Also

Queries

class CKQueryOperation

An operation used to execute queries against a database.

class CKQuery

A query that describes the criteria to apply when searching for records in a database.

class CKQueryOperation.Cursor

An object that marks the stopping point for a query and the starting point for retrieving the remaining 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