Fix code indentation in Xcode
Solution 1:
Before Xcode 9 (for Xcode 9 see default shortcut below)
- select text
- right-click
- there's a "Re-indent selection" item in popup menu
In XCode 4 there is one more step:
- select text
- right-click
- Click on "Structure"
- there's a "Re-indent selection" and other options in popup menu
Or using the default shortcut:
- select text
- press ctrl + i
Solution 2:
- select text
- press
Control-I
(the default keyboard shortcut)