Searching/Filtering a custom class array with a NSPredicate
问题 I have a array that contains objects of a custom class, and I would like to filter the array based on if one of the classes attributes contains a custom string. I have a method that is passed the attribute that I want to be searched (column) and the string that it will search for (searchString). Here is the code I have: NSPredicate *query = [NSPredicate predicateWithFormat:@"%K contains %K", column, searchString]; NSMutableArray *temp = [displayProviders mutableCopy]; [displayProviders