Is there any documentation on the annotation `@Obj...
# kotlin-native
j
Is there any documentation on the annotation
@ObjCMethod(selector, bridge)
? I'm trying to figure out how selectors work with Kotlin/Objective C, as I'm trying to work with UI elements from Kotlin.
s
@ObjCMethod
is internal implementation detail. This annotation is not supposed to be used manually. What exactly are you trying to achieve?
j
Ahhh, ok. I got this error:
Copy code
external function public open external fun viewWillTransitionToSize(size: kotlinx.cinterop.CValue<platform.CoreGraphics.CGSize>, withTransitionCoordinator: platform.UIKit.UIViewControllerTransitionCoordinatorProtocol): kotlin.Unit defined in com.lightningkite.koolui.CustomRootController[SimpleFunctionDescriptorImpl@15c1b543] must have @SymbolName, @Intrinsic or @ObjCMethod annotation
What should I do?
My class looks like this:
Copy code
class CustomRootController : UIViewController(null, null) {
    external override fun viewWillTransitionToSize(size: CValue<CGSize>, withTransitionCoordinator: UIViewControllerTransitionCoordinatorProtocol) {
        super.viewWillTransitionToSize(size, withTransitionCoordinator)
        ApplicationAccess.mutableDisplaySize.value = size.useContents { Point(x = width.toFloat(), y = height.toFloat()) }
    }

    external override fun viewDidAppear(animated: Boolean) {
        ApplicationAccess.mutableIsInForeground.value = true
    }

    external override fun viewDidDisappear(animated: Boolean) {
        ApplicationAccess.mutableIsInForeground.value = false
    }
}
o
please remove
external
modifier
j
Ah, IDE put it in for me. Thanks!