IBOutlet collections declared in Swift are ignored by Interface Builder
| Originator: | jay | ||
| Number: | rdar://22249902 | Date Originated: | 12-Aug-2015 |
| Status: | Duplicate | Resolved: | 14-Aug-2015 |
| Product: | Developer Tools | Product Version: | 7.0 beta 5 |
| Classification: | Reproducible: | Yes |
Summary:
In an OS X project, if I declare an IBOutlet collection in Swift, Interface Builder does not show the collection in the right click interface of the object. Using the same declaration style in an iOS project, the outlet shows up in Interface Builder and behaves as expected.
These collection outlets are declared in a similar way on both platforms:
@IBOutlet var views3: [UIView]?
@IBOutlet var views3: [NSView]?
Steps to Reproduce:
1. Create an OS X project in Xcode 7 beta 5.
2. Declare an IBOutlet collection on a custom view like so:
@IBOutlet var views3: [NSView]?
3. Instantiate an instance of the custom view.
4. Right click on the custom view object.
5. Observe that the collection outlet is missing.
A sample project that shows how this is missing for OS X but works as expected for iOS is available from github at:
https://github.com/jaylyerly/OutletCollectionTestOSX
Expected Results:
Interface Builder should correct recognize IBCollection Outlets declared in Swift on OS X just like it does for iOS projects.
Actual Results:
IBCollection outlets declared in Swift in an OS X project is ignored by Interface Builder. iOS based projects work correctly.
Version:
Xcode 7 beta 5 (7A176x)
OS X 10.10.4
Notes:
Configuration:
This occurs in OS X based projects in Xcode 7 beta 5.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Marked as dup of 9129356.