A fully formed string that completes a partial string.


class MKLocalSearchCompletion : NSObject


You do not create instances of this class directly. Instead, you use an MKLocalSearchCompleter to initiate a search based on a set of partial search strings. That object stores any matches in its results property. Retrieve any MKLocalSearchCompletion objects from that property and display the search terms in your interface or use one to initiate a search for content based on that search term.

When displaying text completions for a partial search term in your user interface, you might want to use a bold version of a font or add some other highlighting to the portion of the completion string that caused it to match the partial search term. To help you add this styling, the completion object includes highlight ranges for the title and subtitle strings.


Getting the Search Completions

var title: String

The title string associated with the point-of-interest.

var subtitle: String

The subtitle (if any) associated with the point-of-interest.

var titleHighlightRanges: [NSValue]

The ranges of characters to highlight in the title string.

var subtitleHighlightRanges: [NSValue]

The ranges of characters to highlight in the subtitle string.


Inherits From

Conforms To

See Also

Placemark and Local Search

Searching for Nearby Points of Interest

Provide automatic search completions based on a user’s partial search query, and search the map for relevant locations nearby.

class MKPlacemark

A user-friendly description of a location on the map.

class MKLocalSearch

A utility object for initiating map-based searches and processing the results.

struct MKLocalSearch.ResultType

Options that indicate types of search results.

class MKLocalSearchCompleter

A utility object for generating a list of completion strings based on a partial search string that you provide.

struct MKLocalSearchCompleter.ResultType

Options that indicate types of search completions.