Below is the relevant code in -filterContentForSearchText:scope: method in MainViewController.m:
NSComparisonResult result = [product.name compare:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch) range:NSMakeRange(0, [searchText length])];
if (result == NSOrderedSame)
{
[self.filteredListContent addObject:product];
}
This compares the first n characters (specified by the range parameter), ignoring case and diacritics, of each string with the first n characters of the current search string, where n is the length of the current search string.
Try changing the code to the following:
NSRange result = [product.name rangeOfString:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch)];
if (result.location != NSNotFound)
{
[self.filteredListContent addObject:product];
}
This searches each string for the current search string.