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 に答える