TTSearch

@interface TTSearch

TomTom Search API main object. Contains methods to use Tomtom’s online search engine and provides support for both async and sync calls.

  • Initializer with tracking ID.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithTrackingID:(NSString *_Nonnull)trackingID;

    Swift

    init(trackingID: String)
  • Delegate that informs the subscriber when a search result is available. It contains a TTSearchResponse object.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<TTSearchDelegate> _Nullable delegate;

    Swift

    weak var delegate: TTSearchDelegate? { get set }
  • Search with async callback

    Declaration

    Objective-C

    - (void)searchWithQuery:(TTSearchQuery *_Nonnull)query;

    Swift

    func search(with query: TTSearchQuery)

    Parameters

    query

    Object containing the data needed to perform a search.

  • Search with async block

    Declaration

    Objective-C

    - (void)searchWithQuery:(TTSearchQuery *_Nonnull)query
           completionHandle:
               (void (^_Nonnull)(TTSearchResponse *_Nullable,
                                 TTResponseError *_Nullable))completionHandler;

    Swift

    func search(with query: TTSearchQuery, completionHandle completionHandler: @escaping (TTSearchResponse?, TTResponseError?) -> Void)

    Parameters

    query

    Object containing the data needed to perform a search.

    completionHandler

    CompletionHandler that informs the subscriber when a search response is available. It contains a TTSearchResponse object.