What is the syntax to declare a C function that returns an Objective-C block? Is it possible?
I thought it should be something like
(void (^)(void)) myFunctionReturningABlock();
but that won't compile.
What is the syntax to declare a C function that returns an Objective-C block? Is it possible? I thought it should be something like
but that won't compile. |
|||||||||||||
|
The syntax for your function is slightly incorrect. As I understand it, you should define your block as a type which you can use as the return type for your function like this:
|
|||||||||||||||||
|