NSPredicate (取A数组不同于B数组的元素)

 NSPredicate * filterPredicate = [NSPredicate predicateWithFormat:@"NOT (SELF IN %@)",B_array];
 NSArray * filter = [A_array filteredArrayUsingPredicate:B_array];

这样   filter   过滤出来的就是A_array不包含 B_array 中的所有item了。

你可能感兴趣的:(NSPredicate (取A数组不同于B数组的元素))