已采纳回答 / 791956776
对象方法:[[NSDictionary alloc] init];静态方法:[NSDictionary dictionary];字面量:@{};这个静态方法只是对对象方法的一层封装,字面量是用语法糖的简写。NSArray,NSString等都是一样的
2015-10-11
//枚举器
NSEnumerator *enumerator;
enumerator = [array1 objectEnumerator];
id thing;
while (thing = [enumerator nextObject]) {
NSLog(@"%@",thing);
}
NSEnumerator *enumerator;
enumerator = [array1 objectEnumerator];
id thing;
while (thing = [enumerator nextObject]) {
NSLog(@"%@",thing);
}
2015-09-10