Search code examples
objective-cxcodemacoscocoaiboutletcollection

IBOutletCollection in Xcode 5.1


I want to create an IBOutletCollection for a list of controls in my application. So in my Document.h I have defined the following outlet:

@property (strong) IBOutletCollection(NSControl) NSArray *myControls;

In earlier versions the Outlet Collections did show up in the respective Inspector in Xcode, but this does not seem to be the case in Xcode 5.1

Outlet Collections before

enter image description here

In my case no Outlet Collections visible in the inspector:

enter image description here

How can I re-enable this behaviour?


Solution

  • As you tagged the questions with the OS X tag, I am assuming you are developing a Mac project.
    IBOutletCollections are not supported by AppKit.

    UIKit has UINibDeclarations.h which defines:

    #ifndef IBOutletCollection
    #define IBOutletCollection(ClassName)
    #endif
    

    The AppKit counterpart NSNibDeclarations.h has no such define.