Terminating app due to uncaught exception 'NSGe...

  OC中,当用forin对数组进行遍历时,是不能对数组进行增删操作的,否则,就会看到:


*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSArrayM: 0x1dc78f00> was mutated while being enumerated.'

 改正为正常的 for(int i = 0; i < size; i ++)即可

你可能感兴趣的:(Terminating app due to uncaught exception 'NSGe...)