Avoiding “NSArray was mutated while being enumerated”

后端 未结 10 1778
傲寒
傲寒 2020-11-29 06:07

I have an NSMutableArray that stores mousejoints for a Box2d physics simulation. When using more than one finger to play I\'ll get exceptions stating

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 06:07

    Maybe you deleted or added objects to your mutableAray while enumerating it. In my situation error appeared in this case.

提交回复
热议问题