【问题标题】:associatedType in Objective-CObjective-C 中的关联类型
【发布时间】:2020-03-04 06:20:36
【问题描述】:

我是 Objective-C 的初学者。

在 Swift 中,我们可以使用associatedType 来使协议通用化。 Objective-C中是否有类似associatedType的API?

任何帮助将不胜感激

【问题讨论】:

    标签: objective-c swift generics swift-protocols associated-types


    【解决方案1】:

    不,你不能在 Objective-C 中使用 associatedTypes。 Objective-C 中也没有类似的概念。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-08
      • 2011-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-07
      • 1970-01-01
      相关资源
      最近更新 更多