I have this switch statement in my code:
switch(buttonIndex){
case 0:
[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES];
I've seen this issue before. It has to do with labels in C, and would apply to a label used for gotos as well. The case1:, case2: lines are labels. For whatever reason, the first statement following a label must not be a declaration. I will do some research and update with more information if someone else doesn't give a good answer.