一、NSDictionary常用方法
//创建
NSDictionary * dict2 = @{@"1":@"dog1", @"2":@"dog2", @"3":@"dog3"};
+ (instancetype)dictionaryWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION NS_SWIFT_UNAVAILABLE("Use dictionary literals instead");
+ (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict;
//操作
NSUInteger count = [dict2 count];
- (nullable ObjectType)objectForKey:(KeyType)aKey;
//添加
- (void)setObject:(id)anObject forKey:(id <NSCopying>)aKey;
//删除指定key的对象
- (void)removeObjectForKey:(id)aKey;
//删除所有的对象
- (void)removeAllObjects;