I was wondering how to implement an if statement that counts the amount of shakes and runs some code, see below...
I'm not sure how to go about this and what to swap SHAKECOUNTTHING with. Thanks a lot!
Code:
if (SHAKECOUNTTHING == 1) { // First shake
NSLog(@"Shake 1");
}
else if (SHAKECOUNTTHING == 2) { // Second shake
NSLog(@"Shake 2");
}
else if (SHAKECOUNTTHING == 3) { // Third shake
NSLog(@"Shake 3");
}
I'm not sure how to go about this and what to swap SHAKECOUNTTHING with. Thanks a lot!