- Format entire code (entire class/controller)
Select the entire code and press control+I on mac to format your code. -
Format particular block of code
Select the code and press:
⌘+]: for right move (indent)
⌘+[: for left move (un-indent)
ref:https://stackoverflow.com/questions/829954/how-can-i-indent-multiple-lines-in-xcode