Hello guys,
i'm programming a new iPhone app and i need your help.
i want to call an IBAction inside another IBAction.
to be more clear, when you press a "button1" then you press the button "color" the background become red but when you press "button2" then you press the button "color" the back group turn blue
thanks,
i'm programming a new iPhone app and i need your help.
i want to call an IBAction inside another IBAction.
to be more clear, when you press a "button1" then you press the button "color" the background become red but when you press "button2" then you press the button "color" the back group turn blue
Code:
@property (retain, nonatomic) IBOutlet UILabel *nom;
@property (retain, nonatomic) IBOutlet UIButton *color;
@property (retain, nonatomic) IBOutlet UIButton *button1;
@property (retain, nonatomic) IBOutlet UIButton *button2;
- (IBAction)couleur;
- (IBAction)action;
- (IBAction)action2;
Code:
- (IBAction)action{
[self couleur] ;
nom.backgroundColor = [UIColor redColor];
}
- (IBAction)action2{
[self couleur1] ;
nom.backgroundColor = [UIColor blueColor];
}
thanks,