Question: Can I intercept a method call in Objective-C? How?

**Edit:**
*Mark Powell*'s answer gave me a partial solution, the *-forwardInvocation* method.
But the documentation states that -forwardInvocation is only called when an object is sent a message for which it has no corresponding method. I'd like a method to be called under all circumstances, even if the receiver does have that selector.

Answer: 
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](http://cocoadev.com/MethodSwizzling). For an example how method swizzling is implemented in a real project check out [OCMock](http://www.mulle-kybernetik.com/software/OCMock/) (an Isolation Framework for Objective-C).
You can swizzle the method call with one of your own, which does whatever you want to do on "interception" and calls through to the original implementation. Swizzling is done with class\_replaceMethod().