在遍历时,又操作NSArray或者NSMutableArray,会出现这个错误。
NSMutableArray
* array = xxx;
for
(
NSDictionary
* dic in array) {
[array removeObject:dic];
}
改为如下即可:
NSMutableArray
* array = xxx;
NSArray
* tempArray = [
NSArray
arrayWithArray: array];
for
(
NSDictionary
* dic in arrayTemp) {
[array removeObject:dic];
}