drofwarcs
11/13/2018, 9:19 PMfun niceMockForClass(aClass: kotlinx.cinterop.ObjCClass?): kotlin.Any?
. How do we get an instance of ObjCClass
from an existing object or from a class type?svyatoslav.scherbina
11/14/2018, 7:13 AMHow do we get an instance ofJust like for any other Objective-C object: by callingfrom an existing objectObjCClass
class
method on it. In Kotlin you have to escape it with backticks:
theObject.`class`()
or from a class type?If
Foo
is an Objective-C class, then it has companion object which is ObjCClass
, so Foo
can be passed for ObjCClass
parameter.drofwarcs
11/14/2018, 7:33 PM