I don't think this is entirely a Swift / Xcode thing, as I've seen it in other languages / IDEs as well.
Why is 'case' inside a switch statement negative indented (I'm not sure if that's the correct way of wording that)?
I would expect a Switch statement to look something like this
switch(type) {
case 1:
// do something
break;
case 2:
// do something else
break;
default:
// default
break;
}
But Xcode insists on this
switch(type) {
case 1:
// do something
break;
case 2:
// do something else
break;
default:
// default
break;
}
Is this a bug, or is there a reason for this? If so, what is it? It's something that has bugged me for quite some time.