I've managed to get my app to count the number of actions on an IBAction button, and then perform a different task once the number of clicks exceeds 10.
Unfortunately, the Count seems to be increasing by 3 at a time, instead of 1.
Any ideas what I've done wrong here?
- (IBAction) do_button_press:(id)sender {
static int count = 0;
count++;
label.text = [NSString stringWithFormat:@"%d\n", count];
if (count++ > 10) {
label.text = @"done";
}
}