从Objective-C轻型通用类继承的Swift类在Objective-C代码中不可见

时间:2019-02-23 13:07:07

标签: objective-c swift generics language-interoperability

我有一个Objective-c课程

@interface LightweightGenericHolder<T: NSObject*> : NSObject

@property (nonatomic, strong, readwrite) T value;

@end

我从中创建了swift子类

public class LightweightGenericHolderSubclass: LightweightGenericHolder<NSString> {

}

在目标C代码中使用 LightweightGenericHolderSubclass 会产生错误使用未声明的标识符'LightweightGenericHolderSubclass'

如何使该班级可见?

谢谢。

0 个答案:

没有答案