摘要:
NSArray:有序的集合,NSSet:无序的集合,散列存储。但是NSSet保证数据的唯一性。当插入相同的数据时,不会有任何效果。从内部实现来说是hash表。NSMutableSet是NSSet的子类,是NSSet的可变形式。NSSet、NSMutableSetNSSet的使用[NSSet setW... 阅读全文
摘要:
NSArray的基本应用总结 NSString*string1 =@"two"; NSString*string2 =@"one"; //创建数组 NSArray*array1 = [NSArrayarrayWithObjects:string1,string2,nil];注意有ni... 阅读全文
摘要:
1、不可变词典NSDictionary的主要用法:[NSDictionary dictionaryWithObjectsAndKeys:..] : 使用键值对直接创建词典对象,结尾必需使用nil标志结束。[dictionary count]: 得到词典的键值对数量。[dictionary keyEn... 阅读全文
摘要:
总结OC中数组排序3种方法:sortedArrayUsingSelector:;sortedArrayUsingComparator:;sortedArrayUsingDescriptors:数组排序Objective-C目录[-]1、简单排序(sortedArrayUsingSelector:)2... 阅读全文