Pregunta

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?

¿Fue útil?

Solución

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..

           }
     }
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top