Declare a block method parameter without using a typedef

前端 未结 5 628
感情败类
感情败类 2020-12-04 05:13

Is it possible to specify a method block parameter in Objective-C without using a typedef? It must be, like function pointers, but I can\'t hit on the winning syntax witho

5条回答
  •  悲哀的现实
    2020-12-04 06:15

    http://fuckingblocksyntax.com

    As a method parameter:

    - (void)someMethodThatTakesABlock:(returnType (^)(parameterTypes))blockName;
    

提交回复
热议问题