【发布时间】:2016-02-06 15:26:47
【问题描述】:
考虑以下 switch 语句:
switch (buttonIndex) {
case 0:
[self fooWithCompletion:^{
[weakSelf finishEditing];
}];
break;
case 1: // Error here
[self barWithCompletion:^{
[weakSelf finishEditing];
}];
break;
default:
break;
}
导致编译错误
Cannot jump from switch statement to this case label
上线case 1:。
为什么会发生这种情况,我该如何解决?
【问题讨论】:
标签: objective-c