Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 628 Bytes
//
// NSDictionary+dictionaryWithObjectsForKeys.m
// AppNetKit
//
// Created by Brent Royal-Gordon on 8/19/12.
// Copyright (c) 2012 Architechies. See README.md for licensing information.
//
#import "NSDictionary+dictionaryWithObjectsForKeys.h"
@implementation NSDictionary (dictionaryWithObjectsForKeys)
- (NSDictionary*)dictionaryWithObjectsForKeys:(NSArray*)keys {
NSMutableDictionary * dict = [NSMutableDictionary new];
for(NSString * key in keys) {
if([self objectForKey:key]) {
[dict setObject:[self objectForKey:key] forKey:key];
}
}
return dict.copy;
}
@end