I have a case where in my collections will be mutated while enumerating.But this is not allowed in iOS.On further investigation found that the NSFastEnumerationState is a c type struct as follows
typedef struct {
unsigned long state;
id *itemsPtr;
unsigned long *mutationsPtr;
unsigned long extra[5];
} NSFastEnumerationState;
So state->mutationPtr denotes whether the collection was mutated or not,based on which exceptions are thrown.Can we override this to show that the collection is not mutated(even if it is mutated),So that the exceptions are not thrown.By overriding we can achieve mutation while enumeration.I don know whether this is a correct idea.Please let me know your suggestions.