Quick Tip Icon
Quick Tip

Re-indent selected code in Xcode

Xcode provides support for a lot of useful keyboard shortcuts to speed up our development process.

Often when we copy code from somewhere, it comes with the wrong indentation.


We can re-indent selected code in Xcode by pressing Ctrl + I.

To re-indent the whole file: Command + A then Ctrl + I.


Swift Gems by Natalia Panferova book coverSwift Gems by Natalia Panferova book cover

Level up your Swift skills!$35

100+ tips to take your Swift code to the next level

Swift Gemsby Natalia Panferova

  • Advanced Swift techniques for experienced developers bypassing basic tutorials
  • Curated, actionable tips ready for immediate integration into any Swift project
  • Strategies to improve code quality, structure, and performance across all platforms

Level up your Swift skills!

100+ tips to take your Swift code to the next level

Swift Gems by Natalia Panferova book coverSwift Gems by Natalia Panferova book cover

Swift Gems

by Natalia Panferova

$35