Sorry, you need to enable JavaScript to visit this website.

Documentation

Documentation

Initialization

TTL2Search class encapsulates a connection bridge to TomTom Online Search service.

TTSearch *search = [[TTSearch alloc] init];

 

Call the searchWithQuery method to perform a search. The call uses the TTL2SearchQuery parameter from the TTL2Search class.
Use the builder design pattern to simplify construction of the TTL2SearchQuery.

The API reference contains a detailed specification of the search objects and options.
It also includes a number of functional examples to illustrate different uses cases.

Search result delegate

Every search request requires a TTL2SearchDelegate object. The object calls one of two methods asynchronously when the search result is ready:

  1. If the search query is successful, the first method returns an array of search results.

  2. If the query fails, the second method returns an error code and an error message.

-(void)search:(TTSearch *)search
completedWithResponse:(TTSearchResponse *)response {
    self.items = response.results;
    [self.tableView reloadData];
}

-(void)search:(TTSearch*)search
failedWithError:(TTResponseError *)error {
    self.items = @[[error.userInfo objectForKey:@"description"]];
    [self.tableView reloadData];
}

 

You are here