Writing code can get messy, especially when you are copying and cutting bits here and there. This quick tip will allow you to clean up your Objective-C code in Xcode.
Lets say you have a for loop inside a while loop inside a method, yet each line is flush on the left, is there a way you can highlight it all and get the tabbing fixed? .. Yes!
There are two quick solutions:
The first is to use the shortcut Ctrl + I .
The second is to right click your code, hover over Structure and click Re-Indent:
I hope this saves you a lot of time.
For more Xcode Tips and Tricks check out this great tutorial: Xcode 5 – Tips and tricks