I met the following compile error:
Cannot invoke 'enumerateObjectsUsingBlock' with an argument list of type '((_, _, _) -> Void)'
I think it may be easier to understand my situation with this screenshot of XCode6.3.
This codes is for testing the fetching of PHAsset objects using the fetchAssetsWithMediaType
method. As you may know, this method returns PHFetchResult which has enumeration methods. I tried to enumerate all object in the result by enumerateObjectsUsingBlock
. Unfortunately, the Swift compiler gave me an error. After a long investigation, I ended up making a conclusion that this code is correct.
For your information, the above code is found by googling for testing PHAsset.