I have a method in an objective-C class. It has 2 callback functions written in C. The class pointer i.e. self
is passed to these functions as void *
.
This is what Objective-C's selector is for: http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/NSInvocationOperation_Class
The API isn't very intuitive, but its fine once you understand it
You might need to do some refactoring as well, now there might be a better way, but when I had this problem my solution was to refactor and use InvoationOperation.