Brad Cupit
Brad Cupit

Reputation: 6580

declare a forward reference to block typedef?

in one header file I have something like:

typedef void (^MyBlock)(void);

I need to use that same exact reference in another header file.

Sure, I can #import one header file into another, or include the typedef in the global pre-compiled header, but instead is there a way to forward reference the block typedef?

Upvotes: 8

Views: 3978

Answers (1)

Joshua Weinberg
Joshua Weinberg

Reputation: 28688

Not as far as I know, I'd just put it in a shared header and include it where it is needed.

Upvotes: 9

Related Questions