Swift 1.2/Xcode 6.3: Cannot add @IBOutlet variables to generic classes

Originator:wagner
Number:rdar://20517756 Date Originated:13-Apr-2015 03:07 PM
Status:Open Resolved:
Product:Developer Tools Product Version:6.3
Classification:Enhancement Reproducible:Not Applicable
 
Summary:

Generic classes can contain properties which are subclasses of UIView, but not expose them to interface builder with the @IBOutlet attribute. The compiler complains that properties in generic classes are not visible to Objective-C (which is correct, but it’s still a limitation in this case which should be removed - generic classes should support interface builder to the extent they can).

To Reproduce:

import UIKit

class AView<T> : UIView
{
	@IBOutlet var imageView : UIImageView! = nil
}

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!