Is any way to autoformat a source code in the Xcode IDE?
In the Xcode menu click [Editor] -> [Swimat] -> [Format] then the current active file will reformat. You can also create a hot-key in [Xcode] -> [Preferences..]
In the default configuration for Visual Studio Code, the command can be run using the shortcut Alt+Shift+F. To format a range, in an already opened project, open the document that you want to modify, select the specific range to format, right-click, and select Format Selection.
The AutoFormat As You Type tab provides options for formatting that occurs automatically based on what you type. Using this feature can minimize the need to apply changes from the Ribbon. AutoFormat As You Type provides three categories of options: Replace as you type, Apply as you type, and Automatically as you type.
There isn't really an autoformat option in Xcode.
There is an option ^I
(Control-I) to re-indent the code, which will re-align the code according to the tab width set in your preferences, but that's about as far as it goes.
You might have better luck with a text editor like TextMate? I don't know for certain, but I know it supports Objective-C and has some macros, there may be a reformat option?
Yes Xcode 4 has an autoformat feature.
Try following:
Please also see here: Fix code indentation in Xcode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With