誰かがこれを使用し[button sendActionsForControlEvents:UIControlEventTouchUpInside];
て別のボタンクリック内からボタンをクリックする方法について詳しく教えてください。
.m
int i = 0;
- (IBAction)brain:(UIButton *)sender {
//Brain of the operation
i++;
}
- (IBAction)subBrain:(UIButton *)sender {
if(i > 1){
/* Here if the brain had been prior clicked then when subBrain is
clicked, edit some variables and re-click the brain button
how would I go about this?!? Also is there a better way of doing this?*/
[button sendActionsForControlEvents:UIControlEventTouchUpInside];
}
}
.h
- (IBAction)brain:(UIButton *)sender;
- (IBAction)subBrain:(UIButton *)sender;