【发布时间】:2015-11-30 10:33:46
【问题描述】:
假设我有以下协议:
protocol DataResponse { .... }
我的问题是,我怎样才能制作像下面这样的另一个协议? :
protocol AnotherProtocol { var data:[DataProtocol] { get } }
当我尝试在下面的Struct 中执行上述操作时,我得到Type 'MyStruct' does not conform to protocol 'AnotherProtocol'
struct myStruct : AnotherProtocol {
var data:[a struct implements DataProtocol] ...
}
【问题讨论】: