I have two classes, the base class is in Obj-c and the subclass is in Swift.
The Obj-c class uses new XCode 7's lightweight generic feature defined as follows:
@interface BaseController<T: SFObject *> : UIViewController
@property(nonatomic, strong) T model;
@end
That works fine for Obj-c subclasses.
Now for Swift if I define the generic type as I usually do I get the following error:
Cannot specialize non-generic type 'BaseObjcController'.
My second class is defined as follows:
class SwiftController: BaseObjcController<SFUser> {
}
Any help would be appreciated.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…