Is there any shortcut key to align code content in Xcode?

1.) Select the text you want to align,

then

2.) press ctrl(^) + I.


+ i (ctrl + i) is the shortcut key equivalent to Editor > Structure > Re-Indent ( in Xcode 6.4)

This will re-indent the line the cursor is on if no text is selected, or it will re-indent your selection.


If you want more than just indentation Xcode does not yet offer built in code formatting but you can use external tools like Uncrustify to apply a consistent code style.

I described how I last set this up here: http://blog.carbonfive.com/2009/08/07/code-formatting-in-xcode/