Can I intercept a method call in Objective-C? How?
Edit: Mark Powell\'s answer gave me a partial solution, the -forwardInvocation
Intercepting method calls in Objective-C (asuming it is an Objective-C, not a C call) is done with a technique called method swizzling.
You can find an introduction on how to implement that here. For an example how method swizzling is implemented in a real project check out OCMock (an Isolation Framework for Objective-C).