Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CiderHouse

macrumors newbie
Original poster
Jan 6, 2012
5
0
Is there any reason for Xcode not to display certain macros and enumeration values in certain classes?

In an Objective-C project, the header file of an NSObject class contains some macros and enumerations. These are recognised and work well across the project, and even appear in the auto-complete window when editing other view controller classes.

However, in the implementation file of the NSObject class itself, the auto-complete window does not show these macros and enumerations. It still works though, but it's just not seen in auto-complete.

The header file is being properly imported.

Any ideas what may be causing this?
 
Xcode has bugs. It also sometimes has behavior that is correct but not expected.

Anything in a header that isn't correctly #imported won't be visible.

Sometimes there are refresh bugs where you have to Build or quit and restart Xcode for it to notice something.

If this annoys you enough try to build a reproducible case and file a bug.
 
You may try deleting the derived data and cleaning the project. Sometimes files are not rebuilt properly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.