You should probably try rewriting your code, such as a recursive call, or just drop common things and call a separate function. But as a correction and quick answer to your question, you could put a shortcut in front of your switch and go to it, for example,
switchLabel: switch(viewNumber) { case 500: { viewNumber = 501; goto switchLabel; } }
Not sure about Objective-C syntax here, but you can also try its variant
int lastView = 0; while (lastView != viewNumber) switch(lastView = viewNumber) { case 500: { viewNumber = 501; break; } }
which will continue the loop until viewNumber no longer changes. However, it is still a pretty pretty sight.
And since we make gotos, you can just go into another matter, as already indicated. You could also pretend to be like a Duff device by placing cases inside other blocks. But this is just crazy .. :)
falstro
source share