Collection NSArrayM was mutated while being enumerated iOS swift
Problem:
While deleting an object from array produces error array was never muted while enumerated.
Solution:
You can easily get what the error is?. Because it says "array was muted while being enumerated".If you are using one array inside loop if you are deleting one object in the array it will be affect the loop count.So better you can use for each looping.In that count will not be used for enumeration.If ou delete objects it will not affect the loop...
Comments
Post a Comment