Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IBOutletCollections and Interface Builder on OSX

I have a NSViewController , in which I wish to create a an IBOutletCollection(NSTextField).

In my header file, I introduced these lines of code :

@property (strong) IBOutletCollection(NSTextField) NSArray *iNetworkIDOctets;

@property (strong) IBOutletCollection(NSTextField) NSArray *oWildcardOctets;

@property (strong) IBOutletCollection(NSTextField) NSArray *oSubnetOctets;

My problem is that I can't see the IBOutletCollection in Interface Builder, therefore, I can't connect my NSTextField items to my outlet collection.

Normal IBoutletproperties work fine though.

enter image description hereenter image description here

like image 539
Corb3nik Avatar asked Mar 07 '14 16:03

Corb3nik


1 Answers

Unfortunately, IBOutletCollection is only supported on iOS. For OS X, you'll have to create a separate outlet for each object, or else come up with an alternate way to reference the text fields in your XIB.

like image 145
Andrew Madsen Avatar answered Oct 17 '22 20:10

Andrew Madsen