Is it possible to pass a an Objective-C pointer function to a C function?
1 Answer
not easily, as most objective-C functions are really the C function objc_messageSend with the name of the actual method passed as a selector (string).
The thing that most resembles a function pointer in objective-C is either an NSInvocation object or a selector and object pair.
2 Comments
David Robles
ok, and do you if it's possible to call an objective-c function from a c function?
Jonathan Grynspan
It is, so long as the file is .m instead of .c. Objective-C is a strict superset of C and so is directly compatible with it.