Weird Switch error in Obj-C

后端 未结 7 565
天命终不由人
天命终不由人 2020-11-29 00:39

I have this switch statement in my code:

switch(buttonIndex){
      case 0:
         [actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES];
           


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 01:40

    Well, if I put the variable declaration before the switch statement it works fine. I guess variable declarations aren't 'expressions' in Objective C?

提交回复
热议问题