ZombieConga, enumerateChildNodes in swift 3

Hi, I’ve just upgraded to swift 3 and i got a problem with:

enumerateChildNodes(withName: “train”) { (node: SKNode, stop: UnsafeMutablePointer) in…
In swift 2, if I wanted to stop enumerating nodes I could just type: stop.memory = true

But the property “memory” doesn’t exist anymore in swift 3…how can I stop enumerating nodes?

Thanks in advance

Just set stop to true.


I tried but it doesn’t work. It says: cannot assign value of type ‘Bool’ to type ‘UnsafeMutablePointer’

        if loseCount >= 2 {
            stop.initialize(to: true)

Thanks for your answer sirkliv.
Can someone verify that ‘stop.initialize(to: true)’ in Swift 3 is exactly the
same as ‘stop.memory = true’ is in Swift 2?


In Swift 3, the property memory is renamed to pointee:
stop.pointee = true
I found it in this Stack Overflow question: