从通用协议声明强大的协议

时间:2019-04-27 16:53:04

标签: swift generics swift-protocols

我该怎么做

protocol FieldIndexProtocol: RawRepresentable where RawValue == Int {
}

或类似的

protocol PopoverFormContentViewProtocol: class {
    associatedtype Field: FieldIndexProtocol where RawValue == Int
}

或类似的

typealias ContentView = UIView & PopoverFormContentViewProtocol where RawValue == Int

离开类型GENERIC

0 个答案:

没有答案