UISearchDisplayDelegate Protocol Reference
| Conforms to | |
| Availability | Available in iOS 3.0 and later. |
| Declared in | UISearchDisplayController.h |
Overview
This protocol defines delegate methods for UISearchDisplayController objects.
Tasks
Search State Change
-
– searchDisplayControllerWillBeginSearch: -
– searchDisplayControllerDidBeginSearch: -
– searchDisplayControllerWillEndSearch: -
– searchDisplayControllerDidEndSearch:
Loading and Unloading the Table View
-
– searchDisplayController:didLoadSearchResultsTableView: -
– searchDisplayController:willUnloadSearchResultsTableView:
Showing and Hiding the Table View
-
– searchDisplayController:willShowSearchResultsTableView: -
– searchDisplayController:didShowSearchResultsTableView: -
– searchDisplayController:willHideSearchResultsTableView: -
– searchDisplayController:didHideSearchResultsTableView:
Responding to Changes in Search Criteria
Instance Methods
searchDisplayController:didHideSearchResultsTableView:
Tells the delegate that the controller just hid its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:didLoadSearchResultsTableView:
Tells the delegate that the controller has loaded its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:didShowSearchResultsTableView:
Tells the delegate that the controller just displayed its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:shouldReloadTableForSearchScope:
Asks the delegate if the table view should be reloaded for a given scope.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- searchOption
The index of the selected scope button in the search bar.
Return Value
YES if the display controller should reload the data in its table view, otherwise NO.
Discussion
If you don’t implement this method, then the results table is reloaded as soon as the scope button selection changes.
You might implement this method if you want to perform an asynchronous search: you would initiate the search in this method, then return NO, and reload the table when you have results.
Availability
- Available in iOS 3.0 and later.
See Also
Declared In
UISearchDisplayController.hsearchDisplayController:shouldReloadTableForSearchString:
Asks the delegate if the table view should be reloaded for a given search string.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- searchString
The string in the search bar.
Return Value
YES if the display controller should reload the data in its table view, otherwise NO.
Discussion
If you don’t implement this method, then the results table is reloaded as soon as the search string changes.
You might implement this method if you want to perform an asynchronous search. You would initiate the search in this method, then return NO. You would reload the table when you have results.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:willHideSearchResultsTableView:
Tells the delegate that the controller is about to hide its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:willShowSearchResultsTableView:
Tells the delegate that the controller is about to display its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayController:willUnloadSearchResultsTableView:
Tells the delegate that the controller is about to unload its table view.
Parameters
- controller
The search display controller for which the receiver is the delegate.
- tableView
The search display controller’s table view.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayControllerDidBeginSearch:
Tells the delegate that the controller has started searching.
Parameters
- controller
The search display controller for which the receiver is the delegate.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayControllerDidEndSearch:
Tells the delegate that the controller has finished searching.
Parameters
- controller
The search display controller for which the receiver is the delegate.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayControllerWillBeginSearch:
Tells the delegate that the controller is about to begin searching.
Parameters
- controller
The search display controller for which the receiver is the delegate.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.hsearchDisplayControllerWillEndSearch:
Tells the delegate that the controller is about to end searching.
Parameters
- controller
The search display controller for which the receiver is the delegate.
Availability
- Available in iOS 3.0 and later.
Declared In
UISearchDisplayController.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-12-03)