📜  在 kotlin 中实现 swift 协议 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:52.040000             🧑  作者: Mango

代码示例1
As of now, K/N requires many extra methods when implementing an 
Objective-C or Swift protocol. Subclassing NSObject removes this 
requirement

class Foo: BarProtocol
    // Override BarProtocol methods and all NSObject methods
    
class Foo: NSObject(), BarProtocol
    //Only need to override BarProtocol's methods