In some IBAction I saw:
IBAction
- (IBAction)pushButton:(id)sender;
This (id)sender when do I use it?
(id)sender
(id)sender is the object which sent the message to that selector.
Code example:
- (IBAction)submitButton:(id)sender { UIButton *button = (UIButton *)sender; [button setEnabled:NO]; [button setTitle:@"foo" forState:UIControlStateDisabled]; }