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:
Update: As of Swift 3, Objective-C lightweight generics are imported into Swift. For more information, see
Old answer: From Interacting with Objective-C APIs:
NOTE
Aside from these Foundation collection classes, Objective-C lightweight generics are ignored by Swift. Any other types using lightweight generics are imported into Swift as if they were unparameterized.
So this is not possible at present. As you can see from the "Generated Interface" assistant view, your Objective-C class is imported to Swift as
public class BaseController : UIViewController {
public var model: SFObject!
}
This was also discussed in the Apple Developer Forum:
Feel free to file an enhancement bug report!