我有这个名字(listsName)数组,我想在fbFriends数组中过滤掉并删除。我怎么能这样做?似乎我的条款不起作用。
// add "names" to listed name array
NSMutableArray *aTempFriendList = [[NSMutableArray alloc] init];
for (int n = 0; n < [[self friendsList] count]; n++) {
NSDictionary *dFriend = [[self friendsList] objectAtIndex:n];
NSString *sName = [dFriend objectForKey:@"name"];
[aTempFriendList addObject:sName];
}
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(name not in %@)", aTempFriendList];
[fbFriends filterUsingPredicate:predicate];
答案 0 :(得分:3)
应为@"not (name in %@)"
。