在自动完成搜索中,我想从 tableview 中获取数据。我使用下面的代码进行自动搜索,但不是自动搜索。如果有人知道,请帮助我
- (void)searchAutocompleteEntriesWithSubstring:(NSString *)substring {
// Put anything that starts with this substring into the autocompleteUrls array
// The items in this array is what will show up in the table view
[autoCompleteData removeAllObjects];
for(NSString *curString in pastData) {
NSRange substringRange = [curString rangeOfString:substring];
if (substringRange.length!= 0) {
[autoCompleteData addObject:curString];
}
}
[routeName reloadData];
}