8th,March,2016 Tuesday
简述
数组是有序的,字典集合是无序的。
"In general, a key can be any object (provided that it conforms to theNSCopying protocol—see below), but note that when using key-value coding the key must be a string (seeKey-Value Coding Fundamentals). Neither a key nor a value can benil; if you need to represent a null value in a dictionary, you should useNSNull"--from apple
大体上,键可以是遵循NSCoping协议的任意对象,但大多数情况是string。 键与值都不可以是nil,如果想显示一个空值,应使用NSNull。
1. 初始化
1)
NSDictionary *dic = @{@"name":@"jolieyang",@"age":23,@"gender":@"woman"};
2)