Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

implement swift protocol in kotlin

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
 
PREVIOUS NEXT
Tagged: #implement #swift #protocol #kotlin
ADD COMMENT
Topic
Name
7+9 =