我注意到要執行表格搜索,必須將該數據的副本插入到搜索數組中。UISearchBar搜索包含文本,潛在文字和圖像的表格行
E.g.
//Initialize the array.
listOfItems = [[NSMutableArray alloc] init];
NSArray *countriesToLiveInArray = [NSArray arrayWithObjects:@"Iceland", @"Greenland", @"Switzerland", @"Norway", @"New Zealand", @"Greece", @"Rome", @"Ireland", nil];
NSDictionary *countriesToLiveInDict = [NSDictionary dictionaryWithObject:countriesToLiveInArray forKey:@"Countries"];
NSArray *countriesLivedInArray = [NSArray arrayWithObjects:@"India", @"U.S.A", nil];
NSDictionary *countriesLivedInDict = [NSDictionary dictionaryWithObject:countriesLivedInArray forKey:@"Countries"];
[listOfItems addObject:countriesToLiveInDict];
[listOfItems addObject:countriesLivedInDict];
//Initialize the copy array.
copyListOfItems = [[NSMutableArray alloc] init];
那麼搜索到的是存儲在複製數組中的對象。
我的問題是,如何在特定單元格中搜索包含文本,子文本和圖像的單元格行。
剛注意到這個問題在6月被問到了!我回答它沒有檢查:( – tarmes 2011-11-23 13:04:18
我需要一個答案,所以我復活了。不想重新發布相同的問題,並使重複 – Spire 2011-11-24 10:18:52