我有一个基本的View Controller,所有Viewcontroller都将从该View Controller继承而来,我想遵循通用类型D(这是一个协议,但我得到
从非协议,非类类型“ D”继承
&
'type'不是'D'的成员类型
这是我的代码
open class BaseViewController <T, D> :
UIViewController,
D,
ViewControllerCommonFeatures
where T : BasePresenter<D>, D.type == Protocol {
}
Base Presenter是一个普通的swift类,D将是一个遵循其他swift协议的swift协议。
我至少希望将D类型定义为协议。
先谢谢了。