Class-Only Protocols in Swift
问题 I want some of my classes (not all) to conform using 'Class-Only Protocols' from docs. What I am doing is protocol RefreshData: class, ClassA, ClassB { func updateController() } and I am getting the errors non class type 'RefreshData cannot inherit from classA non class type 'RefreshData cannot inherit from classB I'm not sure I am following exactly as in the docs. Does anyone have any ideas about this? 回答1: Swift 4 allows you to combine types, so you can have your protocol and then create,