- 3、数组
- (NSArray)
- 1. 创建
- + (id)arrayWithObject:obj1,obj2,...,nil;
- 2. 获取
- - (NSUInteger)count;
- - (NSUInteger)indexOfObject:obj;
- - (id)objectAtIndex:i;
- 3. 查找
- - (BOOL)containsObject:obj;
- 4. 其他
- - (void)makeObjectPerformSelect:(SEL)selector;
- - (NSArray*)sortedArrayUsingSelector:(SEL)selector;
- - (BOOL)writeToFile:path atimically:(BOOL)flag;
- (NSMutableArray)
- 1. 创建
- + (id)arrayWithObject:obj1,obj2,...,nil;
- + (id)arrayWithCapacity:size
- + (id)array
- - (id)initWithCapacity:size
- 2. 增加元素
- - (void)addObject:obj
- - (void)insertObject:obj atIndex:i
- - (void)replacObjectAtIndex:i withObject:obj
- 3. 删除元素
- - (void)removeObject:obj
- - (void)removeObjectAtIndex:i
- 4. 获取
- - (NSUInteger)count;
- - (NSUInteger)indexOfObject:obj;
- - (id)objectAtIndex:i;
- 5. 查找
- - (BOOL)containsObject:obj;
- 6. 其他
- - (void)makeObjectPerformSelect:(SEL)selector;
- - (NSArray*)sortedArrayUsingSelector:(SEL)selector;
- - (BOOL)writeToFile:path atimically:(BOOL)flag;
- - (void)sortUsingSelector:(SEL)selector
复制代码
|
|