Quick Tip Icon
Quick Tip

Re-indent selected code in Xcode

Xcode provides support for a lot of useful keyboard shortcuts to speed up our development process.

Often when we copy code from somewhere, it comes with the wrong indentation.


We can re-indent selected code in Xcode by pressing Ctrl + I.

To re-indent the whole file: Command + A then Ctrl + I.