2
UISearchDisplayController使用我有一個UITableViewController
子類呈現的預先設定的類別列表,並獲取爲他們每個人的網站/ URL列表。我想添加一個搜索功能,允許按站點名稱進行搜索。與網絡獲取的數據
我要的是有一個常用的搜索界面,將開始搜索線程(這將獲取和處理結果),然後顯示它在表格中。我修改我的表委託返回的自定義設置的電池如果UITableView
不是一種形式廈門國際銀行(即它是一個搜索表視圖):
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"RSSCatalogCell";
if(tableView != self.tableView)
return [searchController tableView:tableView cellForRowAtIndexPath:indexPath];
// ... usual cell initialization for categories
}
只要我的網線(從searchBarSearchButtonClicked:
生成)完成,它提出了一個搜索控制器表重新載入數據:
if(searchDisplayController.active)
[searchDisplayController.searchResultsTableView reloadData];
但我還是看到了舊錶(含目錄entires),但它似乎忽略了觸摸。