In some IBAction I saw:
- (IBAction)pushButton:(id)sender;
This (id)sender when do I use it?
It's part of the target-action mechanism of Cocoa, which is one way objects can communicate with each other. In response to an event (such as a mouse click), one object (usually a control of some kind) sends a message to another object. The sender is called, well, "sender", the receiver is the "target" and the message is the "action".
You can use it in the target's message handler to get additional information about the action from the sender.