문제

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?

도움이 되었습니까?

해결책

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

           }
     }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top