You need to split the search string into words, and then iterate through each word to find a match.
You can split the string using this code inside your loop
for(NSString *string in itemsArray)
{
NSArray *words = [text componentsSeparatedByString:@" "];
for (NSString *word in words)
{
NSRange nameRange = [string rangeOfString:word options:NSCaseInsensitiveSearch];
if (nameRange.location != NSNotFound)
{
[filteredItemsArray addObject:string];
break;
}
}
}