0
只是在我的UITableView中發現了一些不受歡迎的行爲,當它處於搜索模式時。這裏是對這個問題的直觀描述,我懷疑的方法在底部。在搜索模式下從UITableView中刪除標題標題
(第1步)完整列表 - OK!
(步驟2)搜索結果 - OK!
(步驟3)鑽入搜索結果 - OK!
(步驟4)導航返回搜索結果 - 也不行!所有頭索引返回...
這是我所返回的各項指標的方法實現:
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
NSArray *sKeysArray = [[listContent allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
sorted = [sKeysArray sortedArrayUsingComparator:self.mySortBlock];
if (tableView == self.searchDisplayController.searchResultsTableView){
return @"";
} else {
return [sorted objectAtIndex:section];
}
}
什麼是解決這一問題的最佳實踐?
感謝
謝謝,馬丁。你節省了我大量的時間調試!這工作。 – Slinky