Thursday, May 9, 2013

NSDictionary keysOfEntriesWithOptions example ios


keysOfEntriesWithOptions :passingTest:

Returns the set of keys whose corresponding value satisfies a constraint described by a block object.
- (NSSet *)keysOfEntriesWithOptions:(NSEnumerationOptions)optspassingTest:(BOOL (^)(id key, id obj, BOOL *stop))predicate
Parameters of [NSDictionary keysOfEntriesWithOptions]
opts
A bit mask of enumeration options.
predicate
A block object that specifies constraints for values in the dictionary.
Return Value of [NSDictionary keysOfEntriesWithOptions]
The set of keys whose corresponding value satisfies predicate.
Example of [NSDictionary keysOfEntriesWithOptions]
NSSet *nullSet = [leafDict keysOfEntriesWithOptions:NSEnumerationConcurrent passingTest:^BOOL(id key, id obj, BOOL *stop) {
    return [obj isEqual:[NSNull null]] ? YES : NO;
}];