Proper tab correction of objective-c in xcode

54 Views Asked by At

In matlab if you highlight a section of code and press cmd+i on mac it corrects all the indentation.

Is there a similar command for xcode? Say I have a for loop inside a while loop inside a method, yet each line is flush on the left, can I highlight it all and get the tabbing fixed?

2

There are 2 best solutions below

0
On

Yes, you can do that in Xcode as well - default shortcut for that is ctrl+I

0
On

It is control + i for Xcode.

Also select the code and right-click and Structure

enter image description here