I was going through Apple’s documentation and I saw something like this (void (^)(void)). Can somebody explain what this statement means? ^ is XOR, right? void XOR void doesn’t makes much sense to me?
There was also something like (void (^)(BOOL finished))
These are blocks which add anonymous functions and function objects to Objective-C. See e.g. Introducing Blocks and Grand Central Dispatch :
Declaring a block variable:
Assigning a block object to it:
Invoking it:
Accepting a block as an argument:
Using that method with an inline block: