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: 
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().
To do something when a method is called, you could try an events based approach. So when the method is called, it broadcasts an event, which is picked up by any listeners. I'm not great with objective C, but I just figured out something similar using [NSNotificationCenter](http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html) in Cocoa. 

But if by "intercept" you mean "stop", then maybe you need more logic to decide wether the method should be called at all.