Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,235
126
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];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.