我想要这个协议:
protocol AddsMoreCommands {
/* ... */
}
仅由从该类继承的类采用UIViewController。该页面告诉我,我可以指定它仅由类(相对于结构)通过编写来采用
protocol AddsMoreCommands: class {
}
但是我看不到如何要求它仅由特定的班级采用。该页面稍后讨论将where子句添加到协议扩展中以检查一致性,但我也看不到如何对其进行调整。
extension AddsMoreCommands where /* what */ {
}
有没有办法做到这一点?谢谢!
self不是Self:-(非常感谢,那很好!