Objective-C之Foundation框架的NSMutableDictionary
来源:互联网 发布:c语言技术论坛 编辑:程序博客网 时间:2024/05/27 01:08
//创建一个空的字典
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
Student *stu1 = [Student studentWithName:@"stu1"];
Student *stu2 = [Student studentWithName:@"stu2"];
//添加元素
[dict setObject:sut1 forKey:@"k1"];
//删除所有的元素
[dict removeAllObjects];
//根据一个key删除一个元素
[dict removeObjectForKey:@"k1"];
//删除多个key对应的value
[dict removeObjectsForkey:[NSArray arrayWithObject:@"k1"] ];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
Student *stu1 = [Student studentWithName:@"stu1"];
Student *stu2 = [Student studentWithName:@"stu2"];
//添加元素
[dict setObject:sut1 forKey:@"k1"];
//删除所有的元素
[dict removeAllObjects];
//根据一个key删除一个元素
[dict removeObjectForKey:@"k1"];
//删除多个key对应的value
[dict removeObjectsForkey:[NSArray arrayWithObject:@"k1"] ];
- Objective-C之Foundation框架的NSMutableDictionary
- Objective-C Foundation框架实践——NSMutableDictionary(一)
- Objective-C之Foundation框架
- Objective-C之Foundation框架
- Objective-C之Foundation框架--数据存储
- Objective-C---Foundation框架
- Objective-C Foundation框架
- 22 Foundation框架之NSDictionary和NSMutableDictionary
- Foundation框架学习之NSDictionary和NSMutableDictionary
- Objective-c的Foundation中常用类4——字典NSDictionary、NSMutableDictionary
- objective-c之Foundation
- Objective-C: Foundation——NSDictionary、NSMutableDictionary、Block
- Objective C Foundation基础框架
- Objective C Foundation基础框架
- Objective-C之成魔之路【15-Foundation框架】
- 黑马程序员---Objective-C Foundation框架学习笔记之二
- IOS开发系列—Objective-C之Foundation框架(一)
- IOS开发系列—Objective-C之Foundation框架
- JDK的动态代理深入解析(Proxy,InvocationHandler)
- Windows下Critical Section、Event、Mutex、Semaphores区别
- eclipse关联java android 源码的方法大全---非常好用
- 双语:红人“IT水果哥”是怎样炼成的?
- centos yum 安装 mysql 并设定密码
- Objective-C之Foundation框架的NSMutableDictionary
- IBM Websphere与IBM HttpServer的集成
- Oracle--查询下周7天的 日期列表
- <数字签名是什么?> 图片理解数字签名
- 【分享】2011~2013.5全球所有足球比赛比分数据以及足彩各公司盘口
- Android中得到布局文件对象两种方式
- 轻松使用线程: 不共享有时是最好的
- 基于lucene的推荐引擎
- HDU 4282 A very hard mathematic problem