Formatting code in xcode 🙌

Umar Ahmed
Jul 18, 2022

As a coder, everyone loves to code beautifully. In terms of flexibilty, vscode comes very handy when formatting code using multiple extensions (native vscode, prettier, etc).

vscode formatted code

But when I recently learned to code on Xcode. I faced difficulties in formatting and writing code sometimes. No doubt xcode auto format code but in some case it didn’t do the job perfectly until I found an option to format my code in Xcode 🙌

It can format this code:

xcode unformatted Code

Into a beautiful formatted code:

xcode formatted Code

Although it is not perfect as vcode but it is very powerful 😍

Format code in xcode using these commands:

  • Select all code using ( command + A )
  • Now format using ( control + I )

Best Regards, Umar Ahmed

--

--

Umar Ahmed

Empowering local developers to learn, connect, and grow.