2

Im trying to define a block type in a class so that I can then use it in other classes.

I've put this in the .h of a class that is used everywhere...

typedef void (^ProgressBlock)(float progress);

but I'd now like to use this block in other places.

I have a class that imports the correct .h file but the ProgressBlock is not available. Is there any way to define the block so I can use it in multiple classes?

4

1 回答 1

1

制作一个常量文件(C 和 C++ 头文件)在其中定义你的块。将该文件导入您想要使用该块的任何位置。

于 2013-08-15T09:56:46.333 回答