The block property, you can set the block at run time.
Here is the syntax to install
Since it is a void type, so inside the class you can set the method by specifying the code
self.completionBlock = ^(id aID, NSError *err){
};
Using the following code, you can call a previously set method / block.
if([self completionBlock])
{
[self completionBlock](aID, nil);
}
source
share