Я реализую UITableView с UISearchDisplayController в xcode 4.2. UITableView и UISearchDisplayController созданы в StoryBoard. Я установил идентификатор ячейки (SampleCell) для UITableView и получил доступ к нему как
cell = [tableView dequeueReusableCellWithIdentifier:@"SampleCell"];
UItableView работает нормально. Но как только я попытаюсь выполнить поиск, сбой приложения с ошибкой ниже.
*** Assertion failure in -[UISearchResultsTableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableView.m:6072
2011-11-09 22:22:16.058 SampleApp[14362:fb03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
Я думаю, мне нужно установить идентификатор ячейки для ячейки self.searchDisplayController.searchResultsTableView. Но я не знаю, как это сделать. Заранее благодарю за любую помощь. =)