OC -基础(六) 学习中。。。
来源:互联网 发布:阿里云专有网络配置 编辑:程序博客网 时间:2024/05/22 17:50
NSDictionary * dict = @{@"1":@"one",@"2":@"two",@"3":@"three"}; NSLog(@"dict = %@",dict); NSDictionary *dict1 =[[NSDictionary alloc] initWithObjectsAndKeys:@"one",@"1",@"two",@"2", nil]; NSLog(@"dict1 = %@", dict1); NSDictionary *dict2 = [NSDictionary dictionaryWithObject:@"four" forKey:@"4"]; NSLog(@"dict2 = %@", dict2); NSEnumerator * keyenum = [dict keyEnumerator]; id obj = nil; while (obj = [keyenum nextObject]) { NSLog(@"key = %@, value =%@", obj, [dict objectForKey:obj]); } NSMutableDictionary *dict3 = [NSMutableDictionary dictionaryWithDictionary:dict]; NSLog(@"dict3 = %@",dict3); NSArray * array = [dict3 allKeys]; NSLog(@"array = %@",array); [dict3 addEntriesFromDictionary:dict2]; NSLog(@"dict3 = %@",dict3);
阅读全文
0 0
- OC -基础(六) 学习中。。。
- OC -基础(一) 学习中。。。
- OC -基础(二) 学习中。。。
- OC -基础(三) 学习中。。。
- OC -基础(四) 学习中。。。
- OC -基础(五) 学习中。。。
- OC -基础(七) 学习中。。。
- OC -基础(八) 学习中。。。
- 六、oc中构造方法的学习
- OC基础(六)
- iOS开发之OC语法基础(六)--可见度
- OC基础回顾(六)了解和使用Xcode
- oc基础之数组与字典(六)
- iOS编程基础-OC(六)-专家级技巧:使用ARC
- IOS学习---OC基础学习(Foundation)
- XML学习基础(六)
- Java基础学习(六)
- Python基础学习(六)
- 为什么精英都是清单控(笔记)——工作清单
- swap分区
- .NET轻量级ORM组件Dapper修炼手册
- Python进阶之路—四
- Mybatis逐步深入
- OC -基础(六) 学习中。。。
- mybatis实现两张表的连接查询(一对多)
- 高效 Linux 4 文件相关操作
- java中的泛型方法
- HashMap遍历的两种方式
- Hopscotch(dfs)
- .NET轻量级ORM组件Dapper葵花宝典
- 能用10块大洋去解决的事,千万不要用时间
- PowerDesigner设置