2012-02-13 3 views
1

fbFriends配列でフィルタリングして削除する名前のこの配列(listingName)があります。私はそれをどのようにすることができますか?私の条項は機能していないようです。NSPredicateは配列内の "name"を除外します

// 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]; 

答えて

2

@"not (name in %@)"である必要があります。

+0

ええ、ちょっとわかりました... @ "NOT(名前IN%@)" –

関連する問題