Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘* Collection <__NSArrayM: 0x175800> was mutated while being enumerated
Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘ * Collection <__NSArrayM: 0x175800> was
Share
You changed a mutable array while you were iterating over it. You can’t do that. One solution might be to iterate over a copy of the array, but it really depends on what you are doing.