Code completion and coloring is not available in preprocessor directives where the condition is not met on the development machine.
Steps to Reproduce:
Within a method of a UIViewController subclass put this code:
#if NS_BLOCKS_AVAILABLE
#else
#endif
Now, try typing code for the first (if == true) condition. The code completion and coloring works as expected. After that, try typing code, for example [UIView beginA..., in the else block. There is no completion at all. Once fully typed, there is also no coloring of the code.
Expected Results:
Expected the IDE to provide code completion and coloring.
Actual Results:
There is no completion at all. Once fully typed, there is also no coloring of the code.
Regression:
Mac OS X 10.7.1 Lion with Xcode 4.1.
Notes:
It appears that the background compiler utilized for code completion and coloring obeys the preprocessor directives and completely disregards any code if the condition is not met on the development environment.
Just discovered it now while reworking some code to support older 3.x platforms where block animations aren't available.