有人可以详细说明如何使用它[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;