Cocoa 中的集合有NSArray(NSMutableArray), NSSet (NSMutableSet, NSCountedSet), NSDictionary (NSMutableDictionary)
NSArray
-(unsigned) count
-(id) objectAtIndex:(unsigned) index
-(BOOL) containsObject:(id) anObject
NSMutableArray
-(void) addObject:(id) anObject
-(void) insertObject:(id) anObject atIndex:(unsigned) index
-(void) removeObjectAtIndex:(unsigned) index
-(void) removeObject:(id) object
NSDictionary
-(unsigned) count
-(id) objectForKey:(id) aKey
-(NSArray *) allKeys
NSMutableDictionary
-(void) setObject:(id) anObject forKey:(id) aKey
-(void) removeObjectForKey:(id) aKey
//操作plist
-(id) initWithContentsOfFile:(NSString *) aPath
-(BOOL) writeToFile:(NSString *) path atomically:(BOOL) flag
獲取地址簿記錄 (加入AddressBook 框架)
#import <AddressBook/AddressBook.h>
ABAddressBook * book = [ABAddressBook sharedAddressBook];
NSArray *people = [book people];
NSString *firstName = [people valueForProperty:@"First"];
NSString *lastName = [people valueForProperty:@"Last"];