Basically I\'m using the AssetsLibrary frameworks in Swift, how could I modify the value of the stop pointer to NO/False/0 (I don\'t even know what value it should except) ?
This is the equivalent of *stop = YES;
:
stop.withUnsafePointer { $0.memory = true }
To make it more succinct, you could do things like:
operator infix <- {}
@infix func <- (ptr: CMutablePointer, value: T) {
ptr.withUnsafePointer { $0.memory = value }
}
and then the line above becomes simply this:
stop <- true
Not sure if that's recommended style, though...
(You can choose characters from / = - + * % < > ! & | ^ . ~
to create custom operators.)