? 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
svyatoslav.scherbina
04/03/2019, 7:48 AM
@ObjCMethod
is internal implementation detail. This annotation is not supposed to be used manually.
What exactly are you trying to achieve?
j
josephivie
04/03/2019, 4:08 PM
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?
josephivie
04/03/2019, 4:10 PM
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
}
}