In my app I have an ibaction and inside it I have 2 different instruction with an “if”
if (i == 0) //do instruction set 1
if (i == 1) //do instruction set 2
// and everytime I push button i change from 0 to 1 or from 1 to 0
the problem is that if I repeatedly press the button of this IbAction it don’t work fine because the previous ibaction didn’t finish its instruction set1
example = press button, it execute instruction set 1, if I push another time the button it shouldn’t work because it it didn’t finish its work and I want to wait the end of instruction set 1 to repeat the push of button.
Do you understand?
Assuming you have
BOOL workInProgressvariable in your class: