There isn't really an code format option in Xcode.
There is an option 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. If you want more than just indentation Xcode does not yet offer built in code formatting but you can use external tools like Uncrustify to apply a consistent code style.
- Download source code from xcode Source Code Beautifier .
- "cd" to the directory containing the package's source code and type "./configure" to configure the package for your system.
- Type `make' to compile the package.
- Optionally, type `make check' to run any self-tests that come with the package.
- Type `make install' to install the programs and any data files and documentation.
- You can remove the program binaries and object files from the source code directory by typing `make clean'.
Please share this post if it's useful to you. Thanks!.