Instance Method

widgetSearch:searchForTerm:maxResults:

Asks the delegate to search using the specified term.

Required.

Declaration

- (void)widgetSearch:(NCWidgetSearchViewController *)controller searchForTerm:(NSString *)searchTerm maxResults:(NSUInteger)max;

Parameters

controller

The widget’s search view controller.

searchTerm

The term a user entered into the search field.

max

The maximum number of results the search view controller can display.

Discussion

The search view controller calls this method as soon as a user begins to type. If there is a maximum number of results the search view controller can display, it specifies this number in max. The delegate can use max to decide how many search results to return.

The delegate sets the search view controller’s searchResults property to the array of search result objects.

See Also