Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

NSArrayM was mutated while being enumerated. #80

Open
ghost opened this issue May 12, 2017 · 2 comments
Open

NSArrayM was mutated while being enumerated. #80

ghost opened this issue May 12, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented May 12, 2017

Can't seem to find a fix for this one. Anyone? See pic.

skaermbillede 2017-05-12 09 13 31

@ghost
Copy link
Author

ghost commented May 13, 2017

Anyone??

@multinerd
Copy link

multinerd commented Sep 15, 2017

NSArrayM was mutated while being enumerated.

This error simply means dont make changes to an array as youre looping though it.

In a nutshell, change this

        for item in items {
            if item = "temp" {
                items.remove(item)
            }
        }

into this

        let itemsCopy = items
        for item in itemsCopy {
            if item = "temp" {
                items.remove(item)
            }
        }

see here for more info

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant