I am trying to limit array of objects getting with [NSArray filteredArrayUsingPredicate]
for better performance.
My Code:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF.Name contains[c] %@", searchText];
NSArray *filteredArray = [self.dataArray filteredArrayUsingPredicate:predicate];
My dataArray
contains about 30.000 objects and I want to limit result array 50. (I need some break statement after 50 match found.) How can I achieve this?