An Enum to Switch statement extension for XCode
An Enum to Switch statement extension for XCode that is built to work with both Swift and Objective-C.
I created it because I hate wasting time typing out all of the switch statements by hand.
Lets say you have a regular enum defined somewhere in your code. You'd go to the definition and highlight the area using your cursor. Once you've done this just go to Editor > SwitchIt > Create Switch to generate your full switch statement. See the output for both Swift and Objective-C below:
Do you not like separating out all of your enum types on different lines? Well, we still have you covered there too. Check out the extra examples below:
Finding it too slow to move your mouse to the Editor menu all the time? Create a shortcut for SwitchIt by going to XCode > Preferences > Key Bindings and filter by SwitchIt. From there you can assign any keyboard shortcut you like.
MIT, see LICENSE