草庐IT

NSOrderedSetArrayProxy

全部标签

ios - 在没有突变的情况下得到 "NSOrderedSetArrayProxy was mutated while being enumerated"错误

我有两个功能:一个返回一个填充在block中的数组-(NSArray*)getArray{NSArray*someValues=@[@0,@42,@23,@5,@8,@2013];NSArray*filter=@[@42,@23,@5];//replacingthisNSMutableOrderedSetwithaNSMutableArray//andreturnjustmatchedthen,resolvestheproblem.//sotheexceptionhastodosomethingwiththatset.NSMutableOrderedSet*matched=[[NSMu