Question

Is it possible to invoke a block within another block?

For example:

-(void)doSomethingWithBlock:(void (^)(id))parameterBlock{

     Blah * object = [Blah doThisblock:^(id sender) {

     //invoke "parameterBlock" here..

     // do other things after as well..

     }
 }

If possible, how would I go about doing it?

Was it helpful?

Solution

I found that I could call the block by doing this:

    -(void)doSomethingWithBlock:(void (^)(id))parameterBlock{

            Blah * object = [Blah doThisblock:^(id sender) {

                   parameterBlock();

                   // do other things after as well..

           }
     }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top