The best and easy way without using scripts, hacks and much more. Just go to Find And Replace and press alt/option + space and press space button in the replace bar and then click on replace all. It will replace the whitespaces with normal spaces and the warning/ error will be gone !!
XCode 4 now supports tabs. You can enable by selecting "View / Show Tab Bar" menu. You can set custom keyboard shortcut to rotate between tabs in "Preferences / Key Bindings / Select Next Tab" option.
Editor -> Show Invisibles in Xcode 4
In Xcode 7 and later, this command has moved to the Editor menu:
Editor > Show Invisibles
or
Editor > Hide Invisible
As of Xcode 12.1, the menu item is now simple "Invisibles". It's checked when invisibles are shown, and un-checked when they are not shown.
Further, it looks like Xcode now uses very light blue dots for spaces, and bold light blue dots for the spaces that correspond to your tab positions, which is very nice.
You can also use defaults to read/write to the Xcode plist
This is used/tested in Xcode 6.1
Editor->Show Invisibles
defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 1
defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 0
Since Xcode 11
:
In the menu check/uncheck:
Editor -> Invisibles
In Xcode 6.x and earlier:
View -> Text -> Show Spaces
View -> Text -> Show Control Characters
It is under Editor -> Invisibles. You can check it to show or uncheck it to hide them.
In the mac environment, you can search for any menu option under the Help menu, then it will open the exact menu path you are looking for. For example, searching for invisibles results in this:
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