美文网首页
NSPredicate (取A数组不同于B数组的元素)

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

作者: InitWithYou | 来源:发表于2016-09-22 11:03 被阅读9次
 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数组的元素)

      本文链接:https://www.haomeiwen.com/subject/kkrzettx.html