'layoutSubviews' overrides nothing


#1

Normally, overriding functions works (eg. I was able to override viewDidLoad in UIViewController). However, for some reason, when trying to override layoutSubviews in UIView, I get an error that says 'layoutSubviews' overrides nothing

@ExportObjCClass
class MyView : UIView {
    constructor(frame: CValue<CGRect>) : super(frame);

    override fun layoutSubviews()
    {
        println("this function was called to layout subviews!!!")
    }
}

Looking at objc.kt, it looks like maybe the problem is that layoutSubviews is defined in the interop as an extension method rather than a method on the base class?

How / What is the best practice for overriding this method on UIView?


#2

It’s starting to look like a bug to me, so I posted: https://github.com/JetBrains/kotlin-native/issues/1035