Xcode auto-complete

Discussion in 'iOS Programming' started by CiderHouse, Jun 2, 2015.

  1. CiderHouse macrumors newbie

    Joined:
    Jan 6, 2012
    #1
    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?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    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.
     
  3. KoolStar macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #3
    You may try deleting the derived data and cleaning the project. Sometimes files are not rebuilt properly.
     

Share This Page