Hi I have a main array that populates the table and I have a filtered array for the search results. Both of these functions work using the method below. My table display and search array works well, except for the problem below in this code block.
- (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
{
[self.filteredListContent removeAllObjects];
for (product *new in parserData)
{
if ([scope isEqualToString:@"Description"])
{
NSRange result = [new.description rangeOfString:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch)];
if (result.location != NSNotFound)
{
[self.filteredListContent addObject:new];
}
}
if ([scope isEqualToString:@"Product"])
{
NSRange result = [new.item rangeOfString:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch)];
if (result.location != NSNotFound)
{
[self.filteredListContent addObject:new];
}
}
}
}
. LMD-2451 TD Professional 3D LCD Monitor. TD Professional, TD Pro, TD , , . , Pro TD, . , , , ? -, . , .
NSMutableArray * parserData;//
NSMutableArray * filterListContent;//
.