user594883 user594883 - 3 months ago 7x
Swift Question

How to stop ´enumerateChildNodesWithName("//*") ´ enumeration?

How do I stop this enumeration? I have the following code and xcode complaining that I cannot assign a value to let constant. Stopping is probably a simple thing but I'm quite the noobie with Swift, so please bare with me.

enter image description here


Generally you'd better show your code as text. With which we can easily copy & paste, and test it, or edit it.

In your code, the type of stop should be shown as UnsafeMutablePointer<ObjCBool> in the Quick Help pane of Xcode.

You need to modify the content of the pointer, in Swift2:

            stop.memory = true