Show Menu

Need an iOS Developer?

Submit your 30 day Job Listing for FREE

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:

xcode structure re-indent code

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

having issues?

We have a Questions and Answer section where you can ask your iOS Development questions to thousands of iOS Developers.

Ask Question

FREE Download!

Get your FREE Swift 2 Cheat Sheet and quick reference guide PDF download when you sign up to SwiftMonthly

Sharing is caring

If you enjoyed this tutorial, please help us and others by sharing using one of the social media buttons below.

iOS-Blog Admin Team

Written by:

We're here to help.