top of page

Re-indent code after editing in Xcode

May 10, 2024
1 min read

Updated: May 11, 2024

Consider the following example which is pretty straight forward:

Let say you change the method signature and add async throws to it, you'll have to change the caller accordingly which, to be honest, messes up the look and feel:

How the change of code messes up the indent

To resolve this you can do the following:

  1. Select the piece of code that feels out of place because of entering new keyword/s

  2. Press control(or Ctrl)⌃+i key and it will re-indent the code:

How to re-indent the messed up code

Website logo
© Bits & Bytes w/ Bakshi. All rights reserved.
bottom of page