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) ?
self.library.enumerateGroupsWithTypes(ALAssetsGroupType(ALAssetsGroupSavedPhotos), usingBlock: {(group: ALAssetsGroup!, stop: CMutablePointer<ObjCBool>) in
},
failureBlock: {(error: NSError!) in
})
I should be able to access the value and modify it with unsafePointer but I can't seems to be able to write the closure correctly.
As of Xcode 6 beta 4, you can now do:
Or, as holex noted, you can:
This is the equivalent of
*stop = YES;
:To make it more succinct, you could do things like:
and then the line above becomes simply this:
Not sure if that's recommended style, though...
(You can choose characters from
/ = - + * % < > ! & | ^ . ~
to create custom operators.)