iOS How To Trigger A Button's Action Programmatically

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,223
123
how can a program a button so it triggers another buttons actions?
 

vultureboy

macrumors member
Nov 28, 2006
62
0
Blackpool, UK
As people have mentioned previously you can just link it to that action in interface builder.

If you wished to do something else on the second button Before calling the first buttons actions then link the button 2 to it's own action and then call the first buttons method like...

Code:
- (IBAction) button2Touch:(id)sender
{
    NSLog(@"Do Something Else Now");
    [self button1Touch:sender];
}