NSArray

数组

 ####------------倒序
NSArray* reversedArray = [[array reverseObjectEnumerator] allObjects];
 ####------------插入到第一个元素
 [array insertObject:@"fff" atIndex:0];                                                                                      

 ####------------删除指定数组
  NSMutableArray *array = [NSMutableArray array];
    
 [array removeObjectsInArray:selectArray];
 ####------------深拷贝数组
[self.doctorArr mutableCopy]

排序

 ####------------冒泡排序
for (int i=0; i imgArr[j]) {
                
                NSString *TempDic=[[imgArr objectAtIndex:i]copy];
                
                imgArr[i] = [[imgArr objectAtIndex:j] copy];
                
                imgArr[j]=TempDic;
                
            }
            
        }
        
    }

遍历

for (int i = 0; i

深copy、浅copy
https://www.jianshu.com/p/359b757d3430
NSArray 总结
https://www.cnblogs.com/dreamWanweidong/p/4998716.html

你可能感兴趣的:(NSArray)